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

Data Structures Assignment BCS403

Uploaded by

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

Data Structures Assignment BCS403

Uploaded by

akshayadhi2020
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

DON BOSCO INSTITUTE OF TECHNOLOGY

Kumbalagodu, Mysore Road, Bengaluru – 560074


Department of CSE (Artificial Intelligence & Machine Learning)
AY-2025-26
Course: Data Structures Course code: BCS403
Semester: III Date of Given : 6.10.2025
Date of submission : 13.10.2024 Max Marks:10
Assignment-I
Sl no Questions CO RBTL
1 Define Data Structures. Explain the different types of data 1 L2
structures. Also discuss their merits and demerits.
2 Discuss the applications of data structures. 1 L2
3 Write a short note on different operations that can be performed 1 L2
on data structures.
4 What is sparse matrix? Represent the following matrix using 1 L2
array and linked list
5 Write a short note on abstract data type. 1 L2
6 Write an algorithm for insertion sort? Consider an array of 1 L2
integers given below. Sort the values in the array using insertion
sort.
39 9 45 63 18 81 1 8 54 72

7 Write an algorithm for radix sort? Consider an array of integers 1 L2


given below. Sort the values in the array using Radix sort.
39 9 45 63 18 81 1 8 54 72

8 Write an algorithm for Quick sort ? Consider an array of integers 1 L3


given below. Sort the values in the array using Quick sort
39 9 45 63 18 81 1 8 54 72

9 Write an algorithm for Merge sort? Consider an array of integers 1 L3


given below. Sort the values in the array using Merge sort
39 9 45 63 18 81 1 8 54 72

10 What is hash function? Explain the different type of hash 1 L3


functions
11 Given a hash table of size 1000, map the key 12345 to an 1 L3
appropriate location in the hash table Multiplication Method. use
A = 0.618033
12 Calculate the hash value for keys 1234 and 5642 using the mid- 1 L3
square method. The hash table has 100 memory locations.
13 Given a hash table of 100 locations, calculate the hash value using 1 L3
folding method for keys 5678, 321, and 34567.
14 What causes a collision in a hash table? Explain the Collision 1 L2
Resolution by Open Addressing.
15 Consider a hash table of size 10. Using linear probing, insert the 1 L3
keys 72, 27, 36, 24, 63, 81, 92, and 101 into the table.
16 Consider a hash table of size 10. Using quadratic probing, insert 1 L3
the keys 72, 27, 36, 24, 63, 81, and 101 into the table. Take c1 = 1
and c2 = 3.
17 Consider a hash table of size = 10. Using double hashing, insert 1 L3
the keys 72,27, 36, 24, 63, 81, 92, and 101 into the table. Take h1
= (k mod 10) and h2 = (k mod 8).
18 Insert the keys 7, 24, 18, 52, 36, 54, 11, and 23 in a chained hash 1 L3
table of 9 memory locations. Use h(k) = k mod m.
19 Insert the keys 7, 24, 18, 52, 36, 54, 11, and 23 in a chained hash 2 L3
table of 9 memory locations. Use h(k) = k mod m.
20 What is stack? Write functions in C for push and pop operations 2 L2
using dynamic array.

21 Write a function to evaluate the postfix expression. Illustrate the 2 L3


same for the given postfix expression:
i)ABC-D*+E^F+ and assume A=6, B=3, C=2, D=5, E=1 and F=7.
ii)6 5 2 3 + 8 * + 3 + *
22 write an algorithm to convert infix to prefix. Convert the 2 L3
following infix expression into postfix expression using stack
i) (A + B) / (C + D) – (D * E)
ii)14 / 7 * 3 – 4 + 9 / 2
Convert the following infix expression into prefix expression
using stack
i) (A + B) / (C + D) – (D * E)
ii) A + B - C

23 What is circular queue? Write procedure to insert and delete an 2 L2


element from the circular queue.
24 Write short notes on double ended queue, Priority queue 2 L2
25 Draw the queue structure in each case when the following 2 L2
operations are performed on an empty queue.
(a) Add A, B, C, D, E, F
(b) Delete two letters
(c) Add G (d) Add H
(e) Delete four letters (f) Add I

Faculty HOD

You might also like