Cracking-The-Coding-Interview icon indicating copy to clipboard operation
Cracking-The-Coding-Interview copied to clipboard

Solutions for Cracking the Coding Interview - 6th Edition

Cracking-The-Coding-Interview

Java Solutions for Cracking the Coding Interview - 6th Edition

  • [X] How to approach the question

Ch 01 - Arrays and Strings

  • [X] 01 - Is Unique
  • [X] 02 - Check Permutation
  • [X] 03 - URLify
  • [X] 04 - Palindrome Permutation
  • [X] 05 - One Away
  • [X] 06 - String Compression
  • [X] 07 - Rotate Matrix
  • [X] 08 - Zero Matrix
  • [X] 09 - String Rotation

Ch 02 - Linked List

  • [X] 01 - Remove Duplicates
  • [X] 02 - Return K'th to Last
  • [X] 03 - Delete Middle Node
  • [X] 04 - Partition
  • [X] 05 - Sum Lists
  • [X] 06 - Palindrome
  • [X] 07 - Intersection
  • [X] 08 - Loop Detection

Ch 03 - Stacks and Queues

  • [ ] 01 - Three in One
  • [X] 02 - Stack Min
  • [X] 03 - Stack of Plates
  • [X] 04 - Queue via Stacks
  • [X] 05 - Sort Stack
  • [X] 06 - Animal Shelter

Ch 04 - Trees and Graphs

  • [ ] 01 - Route Between Nodes
  • [X] 02 - Minimal Tree
  • [X] 03 - List of Depths
  • [X] 04 - Check Balanced
  • [X] 05 - Validate BST
  • [X] 06 - Successor
  • [ ] 07 - Build Order
  • [X] 08 - First Common Ancestor
  • [ ] 09 - BST Sequences
  • [X] 10 - Check Subtree
  • [ ] 11 - Random Node
  • [X] 12 - Paths with Sum

Ch 05 - Bit Manipulation

  • [X] 01 - Insertion
  • [X] 02 - Binary to String
  • [ ] 03 - Flip Bit to Win
  • [ ] 04 - Next Number
  • [ ] 05 - Debugger
  • [ ] 06 - Conversion
  • [ ] 07 - Pairwise Swap
  • [ ] 08 - Draw Line

Ch 06 - Math and Logic Puzzles

  • [X] 01 - The Heavy Pill
  • [X] 02 - Basketball
  • [X] 03 - Dominos
  • [X] 04 - Ants on a Triangle
  • [X] 05 - Jugs of Water
  • [X] 06 - Blue Eyed Island
  • [X] 07 - The Apocalypse
  • [ ] 08 - The Egg Drop Problem
  • [ ] 09 - 100 Lockers
  • [ ] 10 - Poison

Ch 07 - Object Oriented Design

  • [ ] 01 - Deck of Cards
  • [ ] 02 - Call Center
  • [ ] 03 - Jukebox
  • [ ] 04 - Parking Lot
  • [ ] 05 - Online Book Reader
  • [ ] 06 - Jigsaw
  • [ ] 07 - Chat Server
  • [ ] 08 - Othello
  • [ ] 09 - Circular Array
  • [ ] 10 - Minesweeper
  • [ ] 11 - File System
  • [ ] 12 - Hash Table

Ch 08 - Recursion and Dynamic Programming

  • [X] 01 - Triple Step
  • [X] 02 - Robot in a Grid
  • [X] 03 - Magic Index
  • [X] 04 - Power Set
  • [X] 05 - Recursive Multiply
  • [X] 06 - Tower of Hanoi
  • [ ] 07 - Permutations without Dups
  • [ ] 08 - Permutations with Dups
  • [X] 09 - Parens
  • [X] 10 - Paint Fill
  • [ ] 11 - Coins
  • [X] 12 - Eight Queens
  • [ ] 13 - Stack of Boxes
  • [ ] 14 - Boolean Evaluation

Ch 09 - System Design and Scalability

  • [ ] 01 - Stock Data
  • [ ] 02 - Social Network
  • [ ] 03 - Web Crawler
  • [ ] 04 - Duplicate URL's
  • [ ] 05 - Cache
  • [ ] 06 - Sales Rank
  • [ ] 07 - Personal Financial Manager
  • [ ] 08 - Pastebin

Ch 10 - Sorting and Searching

  • [ ] 01 - Sorted Merge
  • [ ] 02 - Group Anagrams
  • [ ] 03 - Search in Rotated Arrat
  • [ ] 04 - Sorted Search, No Size
  • [ ] 05 - Sparse Search
  • [ ] 06 - Sort Big File
  • [ ] 07 - Missing Int
  • [ ] 08 - Find Duplicates
  • [ ] 09 - Sorted Matrix Search
  • [ ] 10 - Rank from Stream
  • [ ] 11 - Peaks and Valleys

Ch 11 - Testing

  • [X] 01 - Mistake
  • [X] 02 - Random Crashes
  • [X] 03 - Chess Test
  • [X] 04 - No Test Tools
  • [X] 05 - Test a Pen
  • [X] 06 - Test an ATM

Ch 13 - Java

  • [X] 01 - Private Constructor
  • [X] 02 - Return from Finally
  • [X] 03 - Final etc
  • [ ] 04 - Generics v/s Templates
  • [X] 05 - TreeMap, HashMap, LinkedHashMap
  • [ ] 06 - Object Reflection
  • [X] 07 - Lambda Expressions
  • [X] 08 - Lambda Random

Ch 14 - Databases

  • [ ] 01 - Multiple Apartments
  • [ ] 02 - Open Requests
  • [ ] 03 - Close All Requests
  • [ ] 04 - Joins
  • [ ] 05 - Denormalization
  • [ ] 06 - Entity Relationship Diagram
  • [ ] 07 - Design Grade Database

Ch 15 - Threads and Locks

  • [ ] 01 - Thread v/s Process
  • [ ] 02 - Context Switch
  • [ ] 03 - Dining Philosopher
  • [ ] 04 - Deadlock-Free Class
  • [ ] 05 - Call In Order
  • [ ] 06 - Synchronized Methods
  • [ ] 07 - FizzBuzz

Ch 16 - Moderate

  • [X] 01 - Number Swapper
  • [X] 02 - Word Frequencies
  • [ ] 03 - Intersection
  • [ ] 04 - Tic Tac Win
  • [ ] 05 - Factorial Zeros
  • [ ] 06 - Smallest Difference
  • [ ] 07 - Number Max
  • [ ] 08 - English Int
  • [ ] 09 - Operations
  • [ ] 10 - Living People
  • [ ] 11 - Diving Board
  • [ ] 12 - XML Encoding
  • [ ] 13 - Bisect Squares
  • [ ] 14 - Best Line
  • [ ] 15 - Master Mind
  • [ ] 16 - Sub Sort
  • [ ] 17 - Contiguous Sequence
  • [ ] 18 - Pattern Matching
  • [ ] 19 - Pound Sizes
  • [ ] 20 - T9
  • [ ] 21 - Sum Swap
  • [ ] 22 - Langton's Ant
  • [ ] 23 - Rand7 from Rand5
  • [ ] 24 - Pairs with Sum
  • [X] 25 - LRU Cache
  • [ ] 26 - Calculator

Ch 17 - Hard

  • [X] 01 - Add without Plus
  • [X] 02 - Shuffle
  • [ ] 03 - Random Set
  • [ ] 04 - Missing Number
  • [ ] 05 - Letters and Numbers
  • [ ] 06 - Count of 2s
  • [ ] 07 - Baby Names
  • [ ] 08 - Circus Tower
  • [ ] 09 - Kth Multiple
  • [ ] 10 - Majority Element
  • [ ] 11 - Word Distance
  • [ ] 12 - BiNode
  • [ ] 13 - Re-Space
  • [ ] 14 - Smallest K
  • [ ] 15 - Longest Word
  • [ ] 16 - The Masseuse
  • [ ] 17 - Multi Search
  • [ ] 18 - Shortest Supersequence
  • [ ] 19 - Missing Two
  • [ ] 20 - Continuous Median
  • [ ] 21 - Volume of Histogram
  • [ ] 22 - Word Transformer
  • [ ] 23 - Max Black Square
  • [ ] 24 - Max Submatrix
  • [ ] 25 - Word Rectangle
  • [ ] 26 - Sparse Similarity