Skip to content

huguensjean/interview-questions

Repository files navigation

Interview Questions

1. twosums.py:

Find the indices of the first two numbers that add to a target sum.

2. linked_list.py & magic_list.py:

Print list frontward and backward.

3. fibonacci.py:

Lucas and fibonacci series.

4. minheap.py & maxheap.py:

Get all pairs in the list that add to a sum.

5. coins.py:

Given some amount of money in a certain currency, please give me the change.

6. sorting.py:

Mergesort a list.

7. tree.py:

Show that two trees are reflective.

T1:

      0
    /   \
   /     \
  1       2
 / \     / \
3   4   5   6

T2: T1 Reflective

      0
    /   \
   /     \
  2       1
 / \     / \
6   5   4   3

Reflective: If you place T2 on the left or right side of T1, it should close like a book.

8. trie.py:

Count the number of words with a given prefix.

9. islands.py:

Count the number of islands in a binary image.

10. graph.py:

DFS, BFS, DFS recursive, BFS recursive, shortest path.

About

Interview Questions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages