0% found this document useful (0 votes)
17 views2 pages

Btech Cse

This document provides an assignment for a data structures course. It includes 16 mandatory questions and 3 supplementary questions covering topics like sequential search, binary search, hashing, sorting algorithms including merge sort, quicksort, and radix sort. Students are asked to write algorithms, trace steps, analyze complexity, calculate probabilities, and sort arrays using the various algorithms. References for the course include computer science textbooks and an online C language tutorial.

Uploaded by

Eshank Pradhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views2 pages

Btech Cse

This document provides an assignment for a data structures course. It includes 16 mandatory questions and 3 supplementary questions covering topics like sequential search, binary search, hashing, sorting algorithms including merge sort, quicksort, and radix sort. Students are asked to write algorithms, trace steps, analyze complexity, calculate probabilities, and sort arrays using the various algorithms. References for the course include computer science textbooks and an online C language tutorial.

Uploaded by

Eshank Pradhan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

B.

TECH - CS
Assignment - 5
Semester-III (Odd), Session: 2023-24
BCS-301: Data Structure
Unit-3 Course Outcome: CO3 – Discuss the computational
Unit-Name: Searching and Sorting efficiency of the sorting and searching algorithms.
Date of Distribution: 23/01/2024 Faculty Name: Dr. Arpita Singh, Mr. Abhishek
Tiwari & Mr. Mohit Shukla

Sr. MANDATORY QUESTIONS BL


1 Write a short note on sequential search and index sequential search. 1
2 Write down algorithm for the linear/sequential search technique. Give its analysis. 4
3 Write down the algorithm of binary search technique. Evaluate the complexity of 5
algorithm.
4 What is difference between sequential (linear) search and binary search technique? 2
5 What do you mean by hashing and collision? Discuss the advantages and disadvantages 2
of hashing over other searching techniques. Discuss types of hash functions.
6 Write the conditions when collision occurs in hashing. Describe any collision detection 2
algorithm in brief.
7 Describe two way merge sort method. Explain the complexities of merge sort method. 2
8 What is quick sort ? Sort the given values using quick sort; present all steps/iterations : 3
38, 81, 22, 48, 13, 69, 93, 14, 45, 58, 79, 72
9 Write an algorithm for merge sorting. Using the algorithm sort in ascending order : 10, 3
25, 16, 5, 35, 48, 8
10 How do you calculate the complexity of sorting algorithms ? Create a recursive function 6
in ‘C’ to implement the merge sort on given set of integers.
11 Write algorithm for quick sort. Trace your algorithm on the following data to sort the list: 3
2, 13, 4, 21, 7, 56, 51, 85, 59, 1, 9, 10. How the choice of pivot elements affects the
efficiency of algorithm.
12 Explain radix sort. 2
13 Write short notes on garbage collection. 1
14 Use quick sort algorithm to sort 15, 22, 30, 10, 15, 64, 1, 3, 9, 2. Is it a stable sorting 4
algorithm? Justify.
15 Write a short note on heap sort. 1
16 Write a recursive quick sort algorithm. 1
SUPPLEMENTARY QUESTIONS
1 An array of 25 distinct elements is to be sorted using quicksort. Assume that the pivot 4
element is chosen uniformly at random. The probability that the pivot element gets placed
in the worst possible location in the first round of partitioning (rounded off to 2 decimal
places) is ______.
2 What is the worst case running times of Insertion sort, Merge sort and Quick sort. 4
5
3 Consider the following array of elements.
〈 89 ,19,50,17,12,15,2,5,7,11,6, 9,100

What is the minimum number of interchanges needed to convert it into a max-heap?

REFERENCES

TEXT BOOKS:
Ref. Authors Book Title Publisher/Press Edition &Year of
[ID] Publication
Computer Concepts and
[T1] E.Balaguruswami McGraw Hill 5th 2016
Programming in C
[T2] Y.P. Kanetkar Let Us C By BPB Publication 5th 2018
REF ERENCE BOOKS:
Ref. Edition &Year of
Authors Book Title Publisher/Press
[ID] Publication
Computer Fundamentals
[R1] Reema Thareja Oxford Publication 2015
and Programming in C.
Computer Basics and C PHI Learning Pvt.
[R2] V.Rajaraman 2015
Programming Limited
ONL INE/DIGITALREF ERENCES:
Ref.
Source Name Source Hyperlink
[ID]
C Tutorial
[D1] https://www.w3schools.com/c/index.php
(w3schools.com)

Signature of Faculty:______________ Signature of HOD:_______________

You might also like