Skip to content

vlmlee/Review-Problems

Repository files navigation

Review-Problems

Just solving a list of interview questions for algorithms and data structures review.

Arrays/Strings:

  • Determine if a string is a palindrome
  • Merge two sorted arrays
  • Reverse an array in place
  • Determine if string is a substring
  • Sorting algorithms: quicksort, mergesort, bucketsort, and countingsort
  • Binary search in a sorted rotated array
  • Matrix multiplication
  • Find all duplicates in an array

Linked List:

  • Reverse a singly linked list
  • Delete/Insert a node in a linked list
  • Detect if there is a cycle in the list and return its starting point
  • Merge two sorted lists
  • Split a list into two lists where one has the even indices while other has the odd indices

Trees:

  • Construct a BST from a sorted array
  • All traversals
  • BFS/DFS
  • Check if a tree is balanced
  • Check if two trees are mirror image of each other
  • Find max path sum in the tree where negative nodes are possible
  • Find the lowest common ancestor of 2 nodes in a tree

Backtracking:

  • Find all permutations of an array
  • Find all possible subsets of an array
  • Convert numbers into words according to letters on an old phone keypad

Hashtables

  • Keep track of multiple occurrences of an object

Dynamic programming:

  • Given you can climb 1, 2, or 3 stairs in one step, how many ways can you reach the top?
  • Djikstra's shortest path algorithm

About

Solutions to common white board interview problems with short explanation.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published