• Stars
    star
    4,918
  • Rank 8,461 (Top 0.2 %)
  • Language
    Python
  • Created over 8 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Cracking the Coding Interview 6th Ed. Python Solutions

Python Solutions to Cracking the Coding Interview, 6th Edition

These are Python solutions for the book Cracking the Coding Interview, 6th Edition by Gayle Laakmann McDowell.

How to use?

To run the programs, just use the python chapter_X/filename.py command.

To run the tests: pip install pytest and pytest

Contributions

Contributions welcome! Please submit separate pull requests for each solution you work on.

In general solutions should fall into one of the following three categories:

  • algorithm demonstration. This is the primary type of problem and solution that the text is concerned with. As such, solutions should not use standard library functions in cases that would make it unnecessary to implement the algorithm. The goal of these solutions should be to have an easy to understand solution that demonstrates understanding of the algorithm.
  • python demonstration. We also accept solutions that solve the problem in a more practical way, using whatever standard library functions are available. Please do not use any third party dependencies. These solutions should also be easy to understand and good examples of pythonic ways of doing things.
  • speed demonstration. These alternative solutions may be accepted if the fastest way to do something is not very readable or intuitive and thus it doesn't fit into the first two categories.

If you want to do everything really well, here are some guidelines. Solutions should:

  • work with Python 3.6 or greater
  • not depend on third-party libraries (like numpy)
  • follow python style conventions
    • lower_case_with_underscores for everything except classes
    • descriptive, longer variable names
  • be formatted using the black code formatter
  • include tests to prove they work. pytest is supported
  • have a clean commit history ideally following the angular commit message convention and including the problem being worked on in parenthesis. For example feature(C01_P04): added solution. The C01_P04 referring to Chapter 1, Problem 4. Look at our commit history for more examples:

We'll still work with your contributions even if they don't follow these guidelines so don't let that stop you.

More Repositories

1

CtCI-6th-Edition

Cracking the Coding Interview 6th Ed. Solutions
Java
11,236
star
2

ctci

Cracking the Coding Interview, 5th Edition
Java
5,122
star
3

CtCI-6th-Edition-JavaScript

Cracking the Coding Interview 6th Ed. JavaScript Solutions
JavaScript
3,091
star
4

CtCI-6th-Edition-cpp

Cracking the Coding Interview 6th Ed. C++ Solutions
C++
1,352
star
5

CtCI-6th-Edition-JavaScript-ES2015

Cracking the Coding Interview 6th Ed. JavaScript ES2015 Solutions
JavaScript
828
star
6

CtCI-6th-Edition-Swift

Cracking the Coding Interview 6th Ed. Swift Solutions
Swift
458
star
7

CtCI-6th-Edition-CSharp

Cracking the Coding Interview 6th Ed. Solutions (C# Port)
C#
327
star
8

CtCI-6th-Edition-Go

Cracking the Coding Interview 6th Ed. Go Solutions
Go
119
star
9

CtCI-6th-Edition-Ruby

Ruby
91
star
10

CtCI-6th-Edition-php

Cracking the Coding Interview 6th Ed. PHP Solutions
PHP
88
star
11

CtCI-6th-Edition-Clojure

Cracking the Coding Interview 6th Ed. Clojure Solutions
Clojure
74
star
12

CtCI-6th-Edition-C

Cracking the Coding Interview 6th Ed. C Solutions
C
61
star
13

CtCI-6th-Edition-Kotlin

Cracking the Coding Interview with Kotlin
Kotlin
57
star
14

CtCI-6th-Edition-Haskell

Cracking the Coding Interview 6th Ed. Haskell Solutions
Haskell
21
star
15

CtCI-6th-Edition-Objective-C

Cracking the Coding Interview 6th Ed. Objective-C Solutions
Objective-C
11
star
16

CtCI-6th-Edition-Julia

Solutions for Cracking the Coding Interview 6th Edition by Gayle Laakmann McDowell (in Julia programming language)
Julia
9
star
17

CtCI-6th-Edition-Groovy

Cracking the Coding Interview 6th Ed. Groovy Solutions
Groovy
5
star