0% found this document useful (0 votes)
102 views

Searching, Hashing and Sorting: MU Problems (CS)

This document discusses various searching and sorting algorithms including sequential search, binary search, hashing, and indexing sequential search. It provides example problems and questions to demonstrate implementing these algorithms to search and sort data structures like arrays and hash tables. Key algorithms and concepts covered include linear probing, quadratic probing, hash functions, and analyzing collision rates during hashing.

Uploaded by

Yash Mulwani
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
102 views

Searching, Hashing and Sorting: MU Problems (CS)

This document discusses various searching and sorting algorithms including sequential search, binary search, hashing, and indexing sequential search. It provides example problems and questions to demonstrate implementing these algorithms to search and sort data structures like arrays and hash tables. Key algorithms and concepts covered include linear probing, quadratic probing, hash functions, and analyzing collision rates during hashing.

Uploaded by

Yash Mulwani
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

MU Problems (CS)

Searching, Hashing and Sorting

▪ 𝑺𝒆𝒒𝒖𝒆𝒏𝒕𝒊𝒂𝒍 𝑺𝒆𝒂𝒓𝒄𝒉
▪ 𝑩𝒊𝒏𝒂𝒓𝒚 𝑺𝒆𝒂𝒓𝒄𝒉
▪ 𝑯𝒂𝒔𝒉𝒊𝒏𝒈
▪ 𝑯𝒂𝒔𝒉 𝑭𝒖𝒏𝒄𝒕𝒊𝒐𝒏𝒔

FEEL FREE TO CONTACT US FOR ANY DOUBT IN THIS eBook: 9049091373


Question #1 Dec 2008, 13
What is hashing? What is meant by collision? Using modulo-division method and
linear probing, store the values given below in array with 10 elements. Show how 10
many collisions occurred? 𝟗𝟗 𝟑𝟑 𝟐𝟑 𝟒𝟒 𝟓𝟔 𝟒𝟑 𝟏𝟗

Question #2 May 2009


Show hash table entries for the given dataset using Linear probing, quadratic
12
probing and double hashing:𝟏𝟐, 𝟒𝟓, 𝟔𝟕, 𝟖𝟖, 𝟐𝟕, 𝟕𝟖, 𝟐𝟎, 𝟔𝟐, 𝟑𝟔, 𝟓𝟓

Question #3 May 2009, 10 Dec 2009, 12


Write a program to implement binary search on sorted set of integers 10

Question #4 Dec 2009


Using the modulo-division method and linear probing. Store the keys shown below
in an array with 19 elements. How many collisions occurred? What is the density of
the list after all keys have been inserted?
224562, 137456, 214562 9

140145, 214576, 162145


144467, 199645, 234534

Question #5 May 2010, Dec 2010


Hash the following in a table of size 11. Use any two collision resolution
5
techniques: - 𝟐𝟑, 𝟎, 𝟓𝟐, 𝟔𝟏, 𝟕𝟖, 𝟑𝟑, 𝟏𝟎𝟎, 𝟖, 𝟗𝟎, 𝟏𝟎, 𝟏𝟒

Question #6 May 2009, 12, Dec 2011


Write short not on: Binary search 10

Question #7 Dec 2011


What is Hashing? Hash the following in a table of size 11. Use any two collision
10
resolution techniques. 𝟐𝟎, 𝟓, 𝟏𝟎, 𝟏𝟏, 𝟐𝟐, 𝟑𝟑, 𝟒𝟎, 𝟓𝟎, 𝟑𝟎, 𝟓𝟏, 𝟑𝟏

www.mathsindepth.in
Question #8 May 2012, 13
Give different searching techniques. Write a program to implement Binary Search. 10

Question #9 May 2012


What is the use of hashing? Show hash table entries for the given dataset using
10
Linear probing and quadratic probing: 𝟏𝟐, 𝟒𝟓, 𝟔𝟕, 𝟖𝟖, 𝟐𝟕, 𝟕𝟖, 𝟐𝟎, 𝟔𝟐, 𝟑𝟔, 𝟓𝟓

Question #10 Dec 2012, 15


Write short not on : Indexed sequential search 5

Question #11 May 2013, 16


Hash the following in a table of size 11 use any two collision resolution
10
techniques.𝟐𝟑, 𝟓𝟓, 𝟎, 𝟕𝟏, 𝟔𝟕, 𝟐𝟑, 𝟏𝟎𝟎, 𝟏𝟖, 𝟏𝟎, 𝟗𝟎, 𝟒𝟒

Question #12 Dec 2013


Explain indexed sequential search with a suitable example. What are the
5
advantages and disadvantages of indexed sequential search?

Question #13 May 2014


What is hashing? What is mean by collision? Using modulo division method &
linear probing, store the values given below in array with 10 elements. 10
𝟗𝟗 𝟑𝟑 𝟐𝟑 𝟒𝟒 𝟓𝟔 𝟒𝟑 𝟏𝟗

Question #14 May 2014, Dec 2017, 18


Write a program in 'C' to implement Binary search on sorted set of integers. 10

Question #15 Dec 2014, May 2015, 16


Write a 'C' program to search a list using Indexed Sequential Search. What are the
10
advantages of using Indexed Sequential Search over Sequential Search?

www.mathsindepth.in
Question #16 May 2018
Using Linear probing and Quadratic probing, insert the following values in the hash
table of size 10. Show how many collisions occur in each iteration: 10
𝟐𝟖, 𝟓𝟓, 𝟕𝟏, 𝟔𝟕, 𝟏𝟏, 𝟏𝟎, 𝟗𝟎, 𝟒𝟒

Question #17 Dec 2011


What is hashing? What properties should a good hash function demonstrate? 5

Question #18 May 2019


What is Hashing? Hash the following data in a table of size 10 using linear probing
and quadratic probing. Also find the number of collisions. 10
𝟔𝟑, 𝟖𝟐, 𝟗𝟒, 𝟕𝟕, 𝟓𝟑, 𝟖𝟕, 𝟐𝟑, 𝟓𝟓, 𝟏𝟎, 𝟒𝟒

www.mathsindepth.in

You might also like