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

Assignment 4-Data Structure

The second document discusses hashing and hash tables, defining hash functions and collision handling. It also includes a short note on linear search, threaded binary trees, Dijkstra's algorithm, priority queues, and adjacency matrices. Optional questions involve implementing linked list operations like searching, reversing, and deleting elements. [SUMMARY

Uploaded by

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

Assignment 4-Data Structure

The second document discusses hashing and hash tables, defining hash functions and collision handling. It also includes a short note on linear search, threaded binary trees, Dijkstra's algorithm, priority queues, and adjacency matrices. Optional questions involve implementing linked list operations like searching, reversing, and deleting elements. [SUMMARY

Uploaded by

akshataharage
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Suryadatta Education Foundation’s

Suryadatta Institute of Management & Mass Communication, Pune-21


MCA Department
Subject : Data Structure
Assignment 4
Note Solved any 5 question

1. Write an algorithm for insertion sort. Apply insertion sort and show all steps
a. to sort the given 54, 95, 64, 9, 56, 73.
2. Apply Rain Terrace algorithm to the following problem.
a. Input: - Height = [4, 2, 0, 3, 2, 5]. Draw the figure and find solution
3. What is Jump Game algorithm?
4. Sort the following data using merge sort algorithm [38, 27, 43, 3, 9, 82, 10]
5. Explain Rules for Tower of Hanoi with a suitable example.
6. Consider the instance of 0/1 knapsack problem n = 3, m = 20, p = (25, 24, 15),
a. w = (18, 15, 10) using dynamic programming. Determine the optimal profit
and the solution vector.
7. Solve the following instance of 0/1 knapsack problem by applying Dynamic
programming n = 3 w = (3, 5, 7) p(3, 7, 12), M = 4
8. Find the longest common subsequence for following string using dynamic
a. programming.
b. X = {A, B, C, D, B, A, C, D, F}
c. Y = {C, B, A, F}
9. Write an algorithm of Kruskal’s algorithm.
10. Sort the following data using Mergesort [ 400, 380, 275, 750, 455, 523, 863, 355,
550, 615].
11. Consider the following array [1, 3, 5, 8, 9, 2, 6, 7, 6] what is minimum number of
jump required to reach the end of the array?
12. Give the explicit and implicit constraints in 8 queen’s problem.
13. Apply the maximum subarray algorithm to the
a. Input : arr = [–2, –5, 6, –2, –3, 1, 5, –6] and find sum of maximum subarray.
14. Write on algorithm for knight’s Tour.
15. Explain quick sort with example
Suryadatta Education Foundation’s
Suryadatta Institute of Management & Mass Communication, Pune-21
MCA Department
Subject : Data Structure
Assignment 5

Hashing
a) Explain the concept of hashing and hash table
b) Define Hash function 2 collision.
c) Explain Min Heap

Write a short note on


a) Linear search
b) Threaded Binary tree
c) Dijkstra's algorithm
d) priority queue
e) Adjacency matrix.
f) Complete binary tree
Optional Question
a) Write an algorithm to implement singly linked list, also write algorithm to search
a given node from list.
b) Write an algorithm to display the contents in reverse order of singly linked list.
c) Write an algorithm to count number of nodes in singly linked list
d) What is the purpose of linked list?
e) Write an algorithm to count number of nodes in singly linked list.
f) Write an algorithm to reverse the nodes of a linked list.
g) Write an algorithm delete element from linked list whose sum is equal to zero.

You might also like