Back to Blog

Interview Questions: Data Structures Catalog

** (I) Linked List Operations **

1. Reverse a linked list. Iterative algorithm.

2. Reverse a linked list. Recursive algorithm.

3. Determine if a linked list has a cycle.

4. Delete elements from one linked list that are present in another.

5. Two linked lists, one ascending and one descending. Merge them into a single ascending linked list.

6. Delete a specified element from a doubly linked list.

** (II) Binary Tree Topics **

1. Breadth-first traversal of a binary tree.

2. Determine if a binary tree is balanced.

3. Return the depth of a binary tree.

** (III) String Topics **

1. Quickly implement a String class.

2. Output all permutations of a string. Note: handle duplicate characters.

3. Reverse a string.

4. Implement the strstr function.

5. Implement the strcmp function.

** (IV) Recursion Topics **

1. Towers of Hanoi problem.

2. Minimum number of steps for the three-peg Towers of Hanoi.