Data Structures
Data Structures
05.10.20
Unit 1
Arrays
Applications of arrays to sorting: selection sort, insertion sort, bubble sort, Chapter 9, Section 9.1.1—9.1.3, 12
2 comparison of sorting techniques via empirical studies. Ref 1
Applications of stacks: prefix, infix and postfix expressions, utility and Chapter 2, Section 2.3 ( upto page no. 106)
4 conversion of these expressions from one to another Additional resource 4
8
Additional resource 4
Chapter 6, Section
Height-balanced trees (AVL), B trees, analysis of insert, delete, search operations on
2 AVL and B trees 6.7.2, Chapter 7, 14
Section 7.1.1
Ref 1
Introduction to heap as a data structure. analysis of insert, extract-min/max and
delete-min/max operations, applications to priority queues Chapter 8, Section 8.1.1, 8.1.3,
3
8.3.1-8.3.4 Ref 2
Unit 6
Hash Tables
1. Ref 1: . Drozdek, A., (2012), Data Structures and algorithm in C++. 4th edition. Cengage Learning.
2. Ref 2.: Goodrich, M., Tamassia, R., & Mount, D., (2011). Data Structures and Algorithms Analysis in C+
+. 2nd edition. Wiley.
3. Additional Resource 3: Sahni, S. (2011). Data Structures, Algorithms and applications in C++. 2ndEdition,
Universities Press
4. Additional Resource 4: Tenenbaum, A. M., Augenstein, M. J., & Langsam Y., (2009), Data Structures
Using C and C++. 2nd edition. PHI.
Note: Ref1, Additional resource etc. as per the LOCF syllabus for the paper.
B.Sc.(H) Computer Science
Semester III
Lab based on Data Structures(LOCF)
List of Practicals* :
1. Given a list of N elements, which follows no particular arrangement, you are required to search an
element x in the list. The list is stored using array data structure. If the search is successful, the output
should be the index at which the element occurs, otherwise returns -1 to indicate that the element is
not present in the list. Assume that the elements of the list are all distinct. Write a program to perform
the desired task.
2. Given a list of N elements, which is sorted in ascending order, you are required to search an element x
in the list. The list is stored using array data structure. If the search is successful, the output should be
the index at which the element occurs, otherwise returns -1 to indicate that the element is not present
in the list. Assume that the elements of the list are all distinct. Write a program to perform the desired
task.
3. Write a program to implement singly linked list which supports the following operations:
(i) Insert an element x at the beginning of the singly linked list
(ii) Insert an element x at i th position in the singly linked list
(iii) Remove an element from the beginning of the singly linked list
(iv) Remove an element from i th position in the singly linked list.
(v) Search for an element x in the singly linked list and return its pointer
(vi) Concatenate two singly linked lists
4. Write a program to implement doubly linked list which supports the following operations:
(i) Insert an element x at the beginning of the doubly linked list
(ii) Insert an element x at i th position in the doubly linked list
(iii) Insert an element x at the end of the doubly linked list
(iv) Remove an element from the beginning of the doubly linked list
(v) Remove an element from i th position in the doubly linked list.
(vi) Remove an element from the end of the doubly linked list
(vii) Search for an element x in the doubly linked list and return its pointer
(viii) Concatenate two doubly linked lists
5. Write a program to implement circularly linked list which supports the following operations:
(i) Insert an element x at the front of the circularly linked list
(ii) Insert an element x after an element y in the circularly linked list
(iii) Insert an element x at the back of the circularly linked list
(iv) Remove an element from the back of the circularly linked list
(v) Remove an element from the front of the circularly linked list
(vi) remove the element x from the circularly linked list
(vii)Search for an element x in the circularly linked list and return its pointer
(viii) Concatenate two circularly linked lists
11. Write a program to implement Binary Search Tree which supports the following operations:
(iii) Search for an element x in the BST and change its value to y and then place the node with
value y at its appropriate position in the BST
(iv) Display the elements of the BST in preorder, inorder, and postorder traversal
* Programs related to the other data structures in the syllabus will be added soon to the list.