Data Structures & Algorithms – 100+ Lab Exercises (Basic, Intermediate, Advanced))

🔰 Basic Level (30+ Exercises)

 

Goal: Build fundamental understanding of data structures and basic algorithmic concepts.

 

Basic Data Structures

  • Implement Arrays and perform basic operations (insertion, deletion, traversal).

  • Work with Strings: Reverse, Palindrome check, Anagram detection.

  • Implement Linked Lists (Singly, Doubly, Circular).

  • Stack implementation and applications (Balanced parentheses, Reverse string).

  • Queue and Circular Queue implementation.

Basic Algorithms

  • Sorting: Bubble Sort, Selection Sort, Insertion Sort.

  • Searching: Linear Search, Binary Search on sorted arrays.

  • Recursion basics: Factorial, Fibonacci series, Tower of Hanoi.

  • Introduction to Hashing: Implement simple hash tables.

  • Understand algorithm complexity (Big O notation).

Basic Problem Solving

  • Reverse a linked list.

  • Detect loop in a linked list.

  • Check balanced parentheses using stack.

  • Merge two sorted arrays.

  • Find duplicates in an array.


 

🚀 Intermediate Level (40+ Exercises)

 

Goal: Deepen knowledge of data structures, introduce advanced algorithms, and improve efficiency.

 

Intermediate Data Structures

  • Implement Binary Trees and Tree Traversals (inorder, preorder, postorder).

  • Binary Search Tree (BST) operations (insert, delete, search).

  • Implement Heaps (Min-Heap, Max-Heap) and Priority Queues.

  • Graph representation: adjacency matrix, adjacency list.

  • Implement Hash Maps with collision handling (chaining, open addressing).

Intermediate Algorithms

  • Sorting: Merge Sort, Quick Sort, Heap Sort.

  • Graph algorithms: BFS, DFS, Detect cycle in directed/undirected graph.

  • Dynamic Programming basics: Fibonacci with memoization, Coin Change problem.

  • Greedy algorithms: Activity selection, Huffman coding.

  • Backtracking basics: N-Queens, Sudoku solver.

Problem Solving & Optimization

  • Lowest Common Ancestor (LCA) in BST.

  • Find shortest path in unweighted graph (BFS).

  • Implement Dijkstra’s algorithm for shortest paths.

  • Subset sum and knapsack problem (0/1).

  • Detect anagrams using hashing.


 

🧠 Advanced Level (40+ Exercises)

 

Goal: Master complex algorithms, optimize data structures, and solve challenging problems.

 

Advanced Data Structures

  • Implement Balanced Trees: AVL Tree, Red-Black Tree.

  • Trie (Prefix Tree) implementation and applications.

  • Segment Trees and Fenwick Trees (Binary Indexed Trees).

  • Disjoint Set Union (Union-Find) data structure.

  • Suffix Trees and Suffix Arrays basics.

Advanced Algorithms

  • Advanced Dynamic Programming: Longest Increasing Subsequence, Edit Distance, Matrix Chain Multiplication.

  • Network Flow algorithms (Ford-Fulkerson, Edmonds-Karp).

  • Advanced Graph algorithms: Topological Sort, Strongly Connected Components, Bridges and Articulation Points.

  • String algorithms: KMP pattern search, Rabin-Karp.

  • Computational Geometry basics (Convex Hull, Line intersection).

Algorithmic Paradigms & Problem Solving

  • Solve hard-level problems on LeetCode / HackerRank.

  • Optimize solutions for time and space complexity.

  • Implement advanced recursion and memoization techniques.

  • Design algorithms for real-world problems: route planning, data compression.

  • Practice coding challenges with constraints on memory and performance.

 

Capstone Projects

 

  • Build a text autocomplete system using Trie.

  • Implement a file system simulation using trees.

  • Design a social network graph and implement friend recommendation.

  • Develop a custom memory allocator using linked lists.

  • Solve competitive programming contest problems end-to-end.


 

Tools & Platforms

 

  • Languages: C++, Java, Python

  • Platforms: LeetCode, HackerRank, Codeforces, GeeksforGeeks, CodeChef

  • IDEs: Visual Studio Code, IntelliJ, CLion

Scroll to Top