These are my current solutions to Elements of Programming Interviews, written in Javascript and Typescript. I'm currently working on updating all solutions into Typescript. A disjoint set of problems done in Python can be found here: EPI-Py
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 |
Compute the Spiral Ordering of a 2D Array | tests |
Problem | Test |
---|---|
Interconvert Strings and Integers | tests |
Replace and Remove | tests |
Problem | Test |
---|---|
Merge two sorted lists | tests |
Cycle Detection | 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 |