Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/careercup/CtCI-6th-Edition-JavaScript
Cracking the Coding Interview 6th Ed. JavaScript Solutions
https://github.com/careercup/CtCI-6th-Edition-JavaScript
Last synced: 5 days ago
JSON representation
Cracking the Coding Interview 6th Ed. JavaScript Solutions
- Host: GitHub
- URL: https://github.com/careercup/CtCI-6th-Edition-JavaScript
- Owner: careercup
- Created: 2016-02-12T05:01:45.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2024-07-05T10:04:44.000Z (4 months ago)
- Last Synced: 2024-10-29T15:06:27.408Z (15 days ago)
- Language: JavaScript
- Size: 111 KB
- Stars: 3,124
- Watchers: 77
- Forks: 1,250
- Open Issues: 40
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- Awesome-JavaScript-Interviews - Cracking the Coding Interview - Javascript
README
# Cracking the Coding Interview 6th Edition - JavaScript
## Instructions
- This repository contains JavaScript attempts on questions listed in the book.
- So far, code or short writeups are available for the first 10 chapters.
- At Gayle's request, the files only contain code, and do not contain the actual questions. For the questions, please support Gayle by purchasing the [book](https://www.amazon.com/Cracking-Coding-Interview-Programming-Questions/dp/0984782850).
- Under each JavaScript file, there are tests to check that the code is working as expected. For convenience, simple logging is used to test the functions. To run the tests, just cd into the folder containing the .js file and run `node .js` to run the tests.
- Contributions welcome
## List of Coding Questions:
#### Chapter 1
- [x] 1.1 - Is Unique
- [x] 1.2 - Check Permutation
- [x] 1.3 - URLify
- [x] 1.4 - Palindrome Permutation
- [x] 1.5 - One Away
- [x] 1.6 - String Compression
- [x] 1.7 - Rotate Matrix
- [x] 1.8 - Zero Matrix
- [x] 1.9 - String Rotation#### Chapter 2
- [x] 2.1 - Remove Dups
- [x] 2.2 - Return Kth to Last
- [x] 2.3 - Delete Middle Node
- [x] 2.4 - Partition
- [x] 2.5 - Sum Lists
- [x] 2.6 - Palindrome
- [x] 2.7 - Intersection
- [x] 2.8 - Loop Detection#### Chapter 3
- [x] 3.1 - Three in One
- [x] 3.2 - Stack Min
- [x] 3.3 - Stack of Plates
- [x] 3.4 - Queue via Stacks
- [x] 3.5 - Sort Stack
- [x] 3.6 - Animal Shelter#### Chapter 4
- [x] 4.1 - Route Between Nodes
- [x] 4.2 - Minimal Tree
- [x] 4.3 - List of Depths
- [x] 4.4 - Check Balanced
- [x] 4.5 - Validate BST
- [x] 4.6 - Successor
- [x] 4.7 - Build Order
- [x] 4.8 - First Common Ancestor
- [x] 4.9 - BST Sequences
- [x] 4.10 - Check Subtree
- [x] 4.11 - Random Node
- [x] 4.12 - Paths with Sum#### Chapter 5
- [x] 5.1 - Insertion
- [x] 5.2 - Binary to String
- [x] 5.3 - Flip Bit To Win
- [x] 5.4 - Next Number
- [x] 5.5 - Debugger
- [x] 5.6 - Conversion
- [x] 5.7 - Pairwise Swap
- [x] 5.8 - Draw Line#### Chapter 6
- [x] 6.1 - Heavy Pill
- [x] 6.2 - Basketball
- [x] 6.3 - Dominos
- [x] 6.4 - Ants on a Triangle
- [x] 6.5 - Jugs of Water
- [x] 6.6 - Blue-Eyed Island
- [x] 6.7 - The Apocalypse
- [x] 6.8 - The Egg Drop Problem
- [x] 6.9 - 100 Lockers
- [x] 6.10 - Poison#### Chapter 7
- [x] 7.1 - Deck of Cards
- [x] 7.2 - Call Center
- [x] 7.3 - Jukebox
- [x] 7.4 - Parking Lot
- [x] 7.5 - Online Book Reader
- [x] 7.6 - Jigsaw
- [x] 7.7 - Chat Server
- [x] 7.8 - Othello
- [x] 7.9 - Circular Array
- [x] 7.10 - Minesweeper
- [x] 7.11 - File System
- [x] 7.12 - Hash Table#### Chapter 8
- [x] 8.1 - Triple Step
- [x] 8.2 - Robot in a Grid
- [x] 8.3 - Magic Index
- [x] 8.4 - Power Set
- [x] 8.5 - Recursive Multiply
- [x] 8.6 - Towers of Hanoi
- [x] 8.7 - Permutations without Dups
- [x] 8.8 - Permutations with Dups
- [x] 8.9 - Parens
- [x] 8.10 - Paint Fill
- [x] 8.11 - Coins
- [x] 8.12 - Eight Queens
- [x] 8.13 - Stack Boxes
- [x] 8.14 - Boolean Eval#### Chapter 9
- [x] 9.1 - Stock Data
- [x] 9.2 - Social Network
- [x] 9.3 - Web Crawler
- [x] 9.4 - Duplicate URLs
- [x] 9.5 - Cache
- [x] 9.6 - Sales Rank
- [x] 9.7 - Personal Financial Manager
- [x] 9.8 - Paste Bin#### Chapter 10
- [x] 10.1 - Sorted Merge
- [x] 10.2 - Group Anagrams
- [x] 10.3 - Search In Rotated Array
- [x] 10.4 - Sorted Search No Size
- [x] 10.5 - Sparse Search
- [x] 10.6 - Sort Big File
- [x] 10.7 - Missing Int
- [x] 10.8 - Find Duplicates
- [x] 10.9 - Sorted Matrix Search
- [x] 10.10 - Rank From Stream
- [x] 10.11 - Peaks And Valleys
## Test
```sh
npm test
```