These are my current solutions to Elements of Programming Interviews, written in Javascript.
After cloning the directory, prepare it with:
npm install
To run the included unit tests:
npm run test:watch
Problem | Test |
---|---|
Computing the parity of a word | tests |
Problem | Test |
---|---|
The Dutch national flag problem | tests |
Problem | Test |
---|
Problem | Test |
---|---|
Merge two sorted lists | tests |
Problem | Test |
---|---|
Implement a stack with max API | tests |
Problem | Test |
---|
Problem | Test |
---|---|
Traversal of binary trees | tests |
Problem | Test |
---|---|
Merging k sorted arrays | tests |
Problem | Test |
---|---|
Finding the first element larger than k | tests |
Problem | Test |
---|
Problem | Test |
---|---|
Checking if the characters of string A can form string B | tests |
Problem | Test |
---|---|
Find the intersection of two sorted lists | tests |
Problem | Test |
---|---|
Determine is a tree is a BST | tests |
Problem | Test |
---|
Problem | Test |
---|---|
Find the edit distance between two strings | tests |
Problem | Test |
---|
Problem | Test |
---|---|
Solve a maze | tests |
Problem | Test |
---|
Problem | Test |
---|
Problem | Test |
---|
Type | Test |
---|---|
Binary Tree | tests |
Binary Search Tree | tests |
Graph Search | tests |
Hashtable | tests |
Binary Heap | tests |
Linked List | tests |
Tree Node | tests |
Sorts | tests |
Trie | tests |