A collection of solutions for the book "Cracking the coding interview" by Gayle Laakmann McDowell (6th edition) made by me in Go just for fun.
go run <chapter>/<exercise>/main.go [optional-params]
e.g.
go run 1_arrays_and_strings/1.1_is_unique/main.go abcde
go test -v ./<chapter>/<exercise>/...
e.g.
go test -v ./1_arrays_and_strings/1.1_is_unique/...
go test -v ./<chapter>/...
e.g.
go test -v ./1_arrays_and_strings/...
go test -v ./...
# | Problem | Solution | Tests | Solved |
---|---|---|---|---|
1.1 | Is Unique | solution | tests | ✅ |
1.2 | Check Permutation | solution | tests | ✅ |
1.3 | URLify | solution | tests | ✅ |
1.4 | Palindrome Permutation | solution | tests | ✅ |
1.5 | One Away | solution | tests | ✅ |
1.6 | String Compression | solution | tests | ✅ |
1.7 | Rotate Matrix | solution | tests | ✅ |
1.8 | Zero Matrix | solution | tests | ✅ |
1.9 | String Rotation | solution | tests | ✅ |
# | Problem | Solution | Tests | Solved |
---|---|---|---|---|
2.1 | Remove Dups | solution | tests | ✅ |
2.2 | Return Kth to Last | solution | tests | ✅ |
2.3 | Delete Middle Node | solution | tests | ✅ |
2.4 | Partition | solution | tests | ✅ |
2.5 | Sum Lists | solution | tests | ✅ |
2.6 | Palindrome | solution | tests | ✅ |
2.7 | Intersection | solution | tests | ✅ |
2.8 | Loop Detection | solution | tests | ✅ |
# | Problem | So3lution | Tests | Solved |
---|---|---|---|---|
3.1 | Three in One | solution | tests | ✅ |
3.2 | Stack Min | solution | tests | ✅ |
3.3 | Stack of Plates | solution | tests | ✅ |
3.4 | Queue via Stacks | solution | tests | ✅ |
3.5 | Sort Stack | solution | tests | ✅ |
3.6 | Animal Shelter | solution | tests | ✅ |
# | Problem | Solution | Tests | Solved |
---|---|---|---|---|
4.1 | Route Between Nodes | solution | tests | ✅ |
4.2 | Minimal Tree | solution | tests | ✅ |
4.3 | List of Depths | solution | tests | ✅ |
4.4 | Check Balanced | solution | tests | ✅ |