Member-only story

Data Structure and Algorithm Coding Interview Questions

Data Structures:

Beginner:

Arrays: Check core concept before starting coding

  • Write a function to reverse an array in place.
  • Find the maximum and minimum elements in an array.
  • Implement linear search and binary search to find an element in an array.
  • Check if an array contains duplicates.

Linked Lists: Check core concept before starting coding

  • Implement a simple Singly Linked List in Swift.
  • Reverse a Singly Linked List.
  • Check if a Singly Linked List has a cycle.

Intermediate:

Stacks:

  • Implement a Stack using arrays or linked lists.
  • Balance parentheses, brackets, and braces using a stack.
  • Evaluate postfix expressions using a stack.

Queues:

  • Implement a Queue using arrays or linked lists.
  • Implement a breadth-first search (BFS) on a graph using a queue.
  • Simulate a job scheduler using a queue.

Trees:

  • Implement a Binary Search Tree (BST) in Swift.
  • Perform in-order, pre-order, and post-order traversals of a BST.
  • Find the minimum, maximum, and height of a BST.

--

--

No responses yet