*The notebooks (.ipynb) read/write the associated unit test (.py) file.
Notebook Installation
Zero Install
This README contains links to Binder , which hosts dynamic notebooks of the repo’s contents online with no installation needed.
Jupyter Notebook
Run:
pip install jupyter
For detailed instructions, scripts, and tools to more optimally set up your development environment, check out the dev-setup repo.
For more details on notebook installation, follow the directions here.
More information on IPython/Jupyter Notebooks can be found here.
Running Challenges
Notebooks
Challenges are provided in the form of IPython/Jupyter Notebooks and have been tested with Python 2.7 and Python 3.x.
If you need to install IPython/Jupyter Notebook, see the Notebook Installation section.
This README contains links to nbviewer, which hosts static notebooks of the repo’s contents
To interact with or to modify elements within the dynamic notebooks, refer to the instructions below
Run the notebook of challenges:
$ git clone https://github.com/donnemartin/interactive-coding-challenges.git
$ cd interactive-coding-challenges
$ jupyter notebook
This will launch your web browser with the list of challenge categories:
Navigate to the Challenge Notebook you wish to solve
Run the cells within the challenge notebook (Cell->Run All)
This will result in an expected unit test error
Solve the challenge and verify it passes the unit test
Check out the accompanying Solution Notebook for further discussion
To debug your solution with pdb, refer to the following ticket.
Note: If your solution is different from those listed in the Solution Notebook, consider submitting a pull request so others can benefit from your work. Review the Contributing Guidelines for details.
Future Development
Challenges, solutions, and unit tests are presented in the form of IPython/Jupyter Notebooks.
Notebooks currently contain mostly Python solutions (tested on both Python 2.7 and Python 3.x), but can be extended to include 40+ supported languages
Repo will be continually updated with new solutions and challenges
I am providing code and resources in this repository to you under an open source license. Because this is my personal repository, the license you receive to my code and resources is from me and not my employer (Facebook).
Copyright 2015 Donne Martin
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
interactive-coding-challenges
120+ continually updated, interactive, and test-driven coding challenges, with Anki flashcards.
Challenges focus on algorithms and data structures found in coding interviews.
Each challenge has one or more reference solutions that are:
Challenges will soon provide on-demand incremental hints to help you arrive at the optimal solution.
Notebooks also detail:
Also included are unit tested reference implementations of various data structures and algorithms.
Challenge Solutions
Anki Flashcards: Coding and Design
The provided Anki flashcard deck uses spaced repetition to help you retain key concepts.
Great for use while on-the-go.
Design Resource: The System Design Primer
Looking for resources to help you prep for the System Design and Object-Oriented Design interviews?
Check out the sister repo The System Design Primer, which contains additional Anki decks:
Notebook Structure
Each challenge has two notebooks, a challenge notebook with unit tests for you to solve and a solution notebook for reference.
Problem Statement
Constraints
Test Cases
Algorithm
Hints
Code (Challenge: Implement Me!)
Unit Test
Index
Challenges Categories
Format: Challenge Category - Number of Challenges
Total number of challenges: 120
Reference Implementations: Data Structures
Unit tested, fully functional implementations of the following data structures:
Reference Implementations: Algorithms
Unit tested, fully functional implementations of the following algorithms:
Reference Implementations: TODO
Installing and Running Challenges
Misc
Challenges
Image Credits
Arrays and Strings
Linked Lists
Stacks and Queues
Graphs and Trees
Sorting
Recursion and Dynamic Programming
Mathematics and Probability
Bit Manipulation
Online Judges
Repo Structure
*The notebooks (.ipynb) read/write the associated unit test (.py) file.
Notebook Installation
Zero Install
This README contains links to Binder , which hosts dynamic notebooks of the repo’s contents online with no installation needed.
Jupyter Notebook
Run:
For detailed instructions, scripts, and tools to more optimally set up your development environment, check out the dev-setup repo.
For more details on notebook installation, follow the directions here.
More information on IPython/Jupyter Notebooks can be found here.
Running Challenges
Notebooks
Challenges are provided in the form of IPython/Jupyter Notebooks and have been tested with Python 2.7 and Python 3.x.
If you need to install IPython/Jupyter Notebook, see the Notebook Installation section.
Run the notebook of challenges:
This will launch your web browser with the list of challenge categories:
To debug your solution with pdb, refer to the following ticket.
Note: If your solution is different from those listed in the Solution Notebook, consider submitting a pull request so others can benefit from your work. Review the Contributing Guidelines for details.
Future Development
Challenges, solutions, and unit tests are presented in the form of IPython/Jupyter Notebooks.
Contributing
Contributions are welcome!
Review the Contributing Guidelines for details on how to:
Credits
Resources
Images
Contact Info
Feel free to contact me to discuss any issues, questions, or comments.
My contact info can be found on my GitHub page.
License
I am providing code and resources in this repository to you under an open source license. Because this is my personal repository, the license you receive to my code and resources is from me and not my employer (Facebook).