0% found this document useful (0 votes)
14 views1 page

Data Structure Assugnment

Data structure aggignment

Uploaded by

balramjika
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)
14 views1 page

Data Structure Assugnment

Data structure aggignment

Uploaded by

balramjika
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/ 1

Maharishi University of Information Technology

Course/Sem: B. Tech III


Branch: CSE
Paper Name: Data Structure and Algorithm
Paper Code: BCSE301

Assignment Number 2
1. Implement a simple phone book using a hash table where keys are names and values
are phone numbers.
2. Implement basic operations such as insert, delete, search, and update in has tables.
3. Explain what a hash function is and how it converts keys into indices for hash tables.
4. Provide an example of a basic hash function and discuss its properties.
5. Define what collision is in the context of hash tables and how it is handled.
6. Explain one method to handle collisions, such as chaining (using linked lists).
7. Given a string, find the first unique character using a hash map to store character
frequencies.
8. Provide a step-by-step approach and discuss the time complexity of your solution.
9. Given an array of integers and a target sum, find pairs that sum up to the target using
a hash set.
10. Outline the approach using a hash set for efficient lookups and discuss its time
complexity.

You might also like