epi-js
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
How to run
After cloning the directory, prepare it with:
npm install
To run the included unit tests:
npm run test:watch
Solutions
Primitive Types
Problem | Test |
---|---|
Computing the parity of a word | tests |
Arrays and Strings
Arrays
Problem | Test |
---|---|
The Dutch national flag problem | tests |
Compute the Spiral Ordering of a 2D Array | tests |
Strings
Problem | Test |
---|---|
Interconvert Strings and Integers | tests |
Replace and Remove | tests |
Linked Lists
Problem | Test |
---|---|
Merge two sorted lists | tests |
Cycle Detection | tests |
Stacks and Queues
Stacks
Problem | Test |
---|---|
Implement a stack with max API | tests |
Queues
Problem | Test |
---|
Binary Trees
Problem | Test |
---|---|
Traversal of binary trees | tests |
Heaps
Problem | Test |
---|---|
Merging k sorted arrays | tests |
Searching
Binary Search
Problem | Test |
---|---|
Finding the first element larger than k | tests |
Generalized Search
Problem | Test |
---|
Hash Tables
Problem | Test |
---|---|
Checking if the characters of string A can form string B | tests |
Sorting
Problem | Test |
---|---|
Find the intersection of two sorted lists | tests |
Binary Search Trees
Problem | Test |
---|---|
Determine is a tree is a BST | tests |
Recursion
Problem | Test |
---|
Dynamic Programming
Problem | Test |
---|---|
Find the edit distance between two strings | tests |
Greedy Algorithms and Invariants
Problem | Test |
---|
Graphs
Problem | Test |
---|---|
Solve a maze | tests |
Parallel Computing
Problem | Test |
---|
Design Problems
Problem | Test |
---|
Honors Class
Problem | Test |
---|
Structures and Algorithms
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 |