Skip to content

Solutions to problems from the book "Cracking the Coding Interview" written in Kotlin.

License

Notifications You must be signed in to change notification settings

jimmymorales/algorithms

Repository files navigation

Solutions to problems from the "Cracking the Coding Interview" book

Solutions for Cracking the Coding Interview 6th Edition by Gayle Laakmann McDowell written in Kotlin.

You can find the descriptions of the problems in the book.

The solutions to the problems try to be idiomatic Kotlin and some of them have alternative solutions written. Feel free to raise an issue for any comment or advice you have, it will be highly appreciate it. Tests for some solutions can be found in src/test/kotlin.

Problems

  1. Arrays and Strings
    1. Is Unique
    2. Check Permutation
    3. URLify
    4. Palindrome Permutation
    5. One Away
    6. String Compression
    7. Rotate Matrix
    8. Zero Matrix
    9. String Rotation
  2. Linked Lists
    1. Remove Dups
    2. Return Kth to Last
    3. Delete Middle Node
    4. Partition
    5. Sum Lists
    6. Palindrome
    7. Intersection
    8. Loop Detection
  3. Stacks and Queues
    1. Three in One
    2. Stack Min
    3. Stack of Plates
    4. Queue vis Stacks
    5. Sort Stack
    6. Animal Shelter
  4. Trees and Graphs
    1. Route Between Nodes
    2. Minimal Tree
    3. List of Depths
    4. Check Balanced
    5. Validate BST
    6. Successor
    7. Build Order
    8. First Common Ancestor
    9. BST Sequences
    10. Check Subtree
    11. Random Node
    12. Paths with Sum
  5. Bit Manipulation
    1. Insertion
    2. Binary to String
    3. Flip Bit to Win
    4. Next Number
    5. Debugger (No coding question, see textbook.)
    6. Conversion
    7. Pairwise Swap

About

Solutions to problems from the book "Cracking the Coding Interview" written in Kotlin.

Topics

Resources

License

Stars

Watchers

Forks

Languages