JAWAHARLAL NEHRU TECHNOLOGICAL UNIVERSITY HYDERABAD

CS306ES: DATA STRUCTURES THROUGH C++ LAB

B.Tech II Year I Semester (R16)

Course Objectives:

  • To write and execute programs in C++ to solve problems using data structures such as arrays, linked lists, stacks, queues, trees, graphs, hash tables and search trees.
  • To learn to write C++programs to implement various sorting and searching algorithms

Course Outcomes:

  • Able to identify the appropriate data structures and algorithms for solving real world problems.
  • Able to implement various kinds of searching and sorting techniques.
  • Able to implement data structures such as stacks, queues, Search trees, and hash tables to solve various computing problems.
  • 1. Write a C++ program that uses functions to perform the following:
  • a) Create a singly linked list of integers.
  • b) Delete a given integer from the above linked list.
  • c) Display the contents of the above list after deletion.
  • 2. Write a template based C++ program that uses functions to perform the following:
  • a) Create a doubly linked list of elements.
  • b) Delete a given element from the above doubly linked list.
  • c) Display the contents of the above list after deletion.
  • 3. Write a C++ program that uses stack operations to convert a given infix expression into its postfix equivalent, Implement the stack using an array.
  • 4. Write a C++ program to implement a double ended queue ADT using an array, using a doubly linked list.
  • 5. Write a C++ program that uses functions to perform the following:
  • a) Create a binary search tree of characters.
  • b) Traverse the above Binary search tree recursively in preorder, in order and post order,
  • 6. Write a C++ program that uses function templates to perform the following:
  • a) Search for a key element in a list of elements using linear search.
  • b) Search for a key element in a list of sorted elements using binary search.
  • 7. Write a C++ program that implements Insertion sort algorithm to arrange a list of integers in ascending order.
  • 8. Write a template based C++ program that implements selection sort algorithm to arrange a list of elements in descending order.
  • 9. Write a template based C++ program that implements Quick sort algorithm to arrange a list of elements in ascending order.
  • 10. Write a C++ program that implements Heap sort algorithm for sorting a list of integers in ascending order.
  • 11. Write a C++ program that implements Merge sort algorithm for sorting a list of integers in ascending order
  • 12. Write a C++ program to implement all the functions of a dictionary (ADT) using hashing.
  • 13. Write a C++ program that implements Radix sort algorithm for sorting a list of integers in ascending order
  • 14. Write a C++ program that uses functions to perform the following:
  • a) Create a binary search tree of integers.
  • b) Traverse the above Binary search tree non recursively in inorder.
  • 15. Write a C++ program that uses functions to perform the following:
  • a) Create a binary search tree of integers.
  • b) Search for an integer key in the above binary search tree non recursively.
  • c) Search for an integer key in the above binary search tree recursively.

REFERENCE BOOKS

  • 1. Data Structures using C++, D. S. Malik, 2 nd edition, Cengage learning.
  • 2. Data Structures using C++, V. Patil, Oxford University Press.
  • 3. Fundamentals of Data structures in C++, 2nd edition, E. Horowitz, S. Sahni and D. Mehta, Universities Press.
  • 4. C++ Plus Data Structures, 4th edition, Nell Dale, Jones and Bartlett student edition.

Loading Question Papers

Fetching data from database...