[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-2079":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":37,"readmeContent":38,"aiSummary":39,"trendingCount":16,"starSnapshotCount":16,"syncStatus":40,"lastSyncTime":41,"discoverSource":42},2079,"interactive-coding-challenges","donnemartin\u002Finteractive-coding-challenges","donnemartin","120+ interactive Python coding interview challenges (algorithms and data structures).  Includes Anki flashcards.","",null,"Python",31513,4634,959,37,0,8,27,110,30,45,"Other",false,"master",true,[27,28,29,30,31,32,33,34,35,36],"algorithm","coding","competitive-programming","data-structure","development","interview","interview-practice","interview-questions","programming","python","2026-06-12 02:00:36","\u003Cbr\u002F>\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fmaster\u002Fimages\u002Fcover_challenge.gif\">\n\u003C\u002Fp>\n\ninteractive-coding-challenges\n============\n\n[![Binder](https:\u002F\u002Fmybinder.org\u002Fbadge_logo.svg)](https:\u002F\u002Fmybinder.org\u002Fv2\u002Fgh\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fmaster)\n\n**120+ continually updated, interactive, and test-driven coding challenges**, with [Anki flashcards](#anki-flashcards-coding-and-design).\n\nChallenges focus on **algorithms** and **data structures** found in **coding interviews**.\n\nEach challenge has one or more reference solutions that are:\n\n* Fully functional\n* Unit tested\n* Easy-to-understand\n\nChallenges will soon provide on-demand [incremental hints](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fissues\u002F22) to help you arrive at the optimal solution.\n\nNotebooks also detail:\n\n* Constraints\n* Test cases\n* Algorithms\n* Big-O time and space complexities\n\nAlso included are **unit tested reference implementations** of various [data structures](#reference-implementations-data-structures) and [algorithms](#reference-implementations-algorithms).\n\n## Challenge Solutions\n\n\u003Cbr\u002F>\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fmaster\u002Fimages\u002Fcover_solution.gif\">\n\u003C\u002Fp>\n\u003Cbr\u002F>\n\n## Anki Flashcards: Coding and Design\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"http:\u002F\u002Fi.imgur.com\u002Fb4YtAEN.png\">\n  \u003Cbr\u002F>\n\u003C\u002Fp>\n\nThe provided [Anki flashcard deck](https:\u002F\u002Fapps.ankiweb.net\u002F) uses spaced repetition to help you retain key concepts.\n\n* [Coding deck](anki_cards\u002FCoding.apkg)\n\nGreat for use while on-the-go.\n\n### Design Resource: The System Design Primer\n\nLooking for resources to help you prep for the **System Design** and **Object-Oriented Design interviews**?\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"http:\u002F\u002Fi.imgur.com\u002FzdCAkB3.png\">\n  \u003Cbr\u002F>\n\u003C\u002Fp>\n\nCheck out the sister repo [The System Design Primer](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Fsystem-design-primer), which contains additional Anki decks:\n\n* [System design deck](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Fsystem-design-primer\u002Fblob\u002Fmaster\u002Fresources\u002Fflash_cards\u002FSystem%20Design.apkg)\n* [System design exercises deck](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Fsystem-design-primer\u002Fblob\u002Fmaster\u002Fresources\u002Fflash_cards\u002FSystem%20Design%20Exercises.apkg)\n* [Object oriented design exercises deck](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Fsystem-design-primer\u002Fblob\u002Fmaster\u002Fresources\u002Fflash_cards\u002FOO%20Design.apkg)\n\n![](https:\u002F\u002Fcamo.githubusercontent.com\u002Fe45e39c36eebcc4c66e1aecd4e4145112d8e88e3\u002F687474703a2f2f692e696d6775722e636f6d2f6a6a3341354e382e706e67)\n\n## Notebook Structure\n\nEach challenge has two notebooks, a **challenge notebook** with unit tests for you to solve and a **solution notebook** for reference.\n\n### Problem Statement\n\n* States the problem to solve.\n\n### Constraints\n\n* Describes any constraints or assumptions.\n\n### Test Cases\n\n* Describes the general and edge test cases that will be evaluated in the unit test.\n\n### Algorithm\n\n* [Challenge Notebook] Empty, refer to the solution notebook algorithm section if you need a hint.\n* [Solution Notebook] One or more algorithm solution discussions, with Big-O time and space complexities.\n\n### Hints\n\n* [Challenge Notebook] Provides on-demand [incremental hints](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fissues\u002F22) to help you arrive at the optimal solution.  Coming soon!\n\n### Code (Challenge: Implement Me!)\n\n* [Challenge Notebook] Skeleton code for you to implement.\n* [Solution Notebook] One or more reference solutions.\n\n### Unit Test\n\n* [Challenge Notebook] Unit test for your code.  Expected to fail until you solve the challenge.\n* [Solution Notebook] Unit test for the reference solution(s).\n\n## Index\n\n### Challenges Categories\n\n**Format**: Challenge Category - Number of Challenges\n\n* [Arrays and Strings](#arrays-and-strings) - 10\n* [Linked Lists](#linked-lists) - 8\n* [Stacks and Queues](#stacks-and-queues) - 8\n* [Graphs and Trees](#graphs-and-trees) - 21\n* [Sorting](#sorting) - 10\n* [Recursion and Dynamic Programming](#recursion-and-dynamic-programming) - 17\n* [Mathematics and Probability](#mathematics-and-probability) - 6\n* [Bit Manipulation](#bit-manipulation) - 8\n* [Online Judges](#online-judges) - 16\n* [System Design](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Fsystem-design-primer#system-design-interview-questions-with-solutions) - 8\n* [Object Oriented Design](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Fsystem-design-primer#object-oriented-design-interview-questions-with-solutions) - 8\n\n**Total number of challenges: 120**\n\n### Reference Implementations: Data Structures\n\nUnit tested, fully functional implementations of the following data structures:\n\n* [Linked List](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Flinked_lists\u002Flinked_list\u002Flinked_list_solution.ipynb)\n* [Stack](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fstacks_queues\u002Fstack\u002Fstack_solution.ipynb)\n* [Queue](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fstacks_queues\u002Fqueue_list\u002Fqueue_list_solution.ipynb)\n* [Binary Search Tree](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fbst\u002Fbst_solution.ipynb)\n* [Graph](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fgraph\u002Fgraph_solution.ipynb)\n* [Min Heap](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fmin_heap\u002Fmin_heap_solution.ipynb)\n* [Trie](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Ftrie\u002Ftrie_solution.ipynb)\n* [Priority Queue](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Farrays_strings\u002Fpriority_queue\u002Fpriority_queue_solution.ipynb)\n* [Hash Map](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Farrays_strings\u002Fhash_map\u002Fhash_map_solution.ipynb)\n\n### Reference Implementations: Algorithms\n\nUnit tested, fully functional implementations of the following algorithms:\n\n* [Selection Sort](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Fselection_sort\u002Fselection_sort_solution.ipynb)\n* [Insertion Sort](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Finsertion_sort\u002Finsertion_sort_solution.ipynb)\n* [Quick Sort](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Fquick_sort\u002Fquick_sort_solution.ipynb)\n* [Merge Sort](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Fmerge_sort\u002Fmerge_sort_solution.ipynb)\n* [Radix Sort](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Fradix_sort\u002Fradix_sort_solution.ipynb)\n* [Topological Sort](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fgraph_build_order\u002Fbuild_order_solution.ipynb)\n* [Tree Depth-First Search (Pre-, In-, Post-Order)](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Ftree_dfs\u002Fdfs_solution.ipynb)\n* [Tree Breadth-First Search](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Ftree_bfs\u002Fbfs_solution.ipynb)\n* [Graph Depth-First Search](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fgraph_dfs\u002Fdfs_solution.ipynb)\n* [Graph Breadth-First Search](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fgraph_bfs\u002Fbfs_solution.ipynb)\n* [Dijkstra's Shortest Path](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fgraph_shortest_path\u002Fgraph_shortest_path_solution.ipynb)\n* [Unweighted Graph Shortest Path](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fgraph_shortest_path_unweighted\u002Fshortest_path_solution.ipynb)\n* [Knapsack 0\u002F1](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fknapsack_01\u002Fknapsack_solution.ipynb)\n* [Knapsack Unbounded](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fknapsack_unbounded\u002Fknapsack_unbounded_solution.ipynb)\n* [Sieve of Eratosthenes](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fmath_probability\u002Fgenerate_primes\u002Fcheck_prime_solution.ipynb)\n\n### Reference Implementations: TODO\n\n* [A*](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md)\n* [Bellman-Ford](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md)\n* [Bloom Filter](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md)\n* [Convex Hull](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md)\n* [Fisher-Yates Shuffle](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md)\n* [Kruskal's](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md)\n* [Max Flow](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md)\n* [Prim's](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md)\n* [Rabin-Karp](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md)\n* [Traveling Salesman](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md)\n* [Union Find](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md)\n* [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md)\n\n### Installing and Running Challenges\n\n* [Repo Structure](#repo-structure)\n* [Notebook Installation](#notebook-installation)\n* [Running Challenges](#running-challenges)\n\n### Misc\n\n* [Contributing](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md)\n* [Credits](#credits)\n* [Contact Info](#contact-info)\n* [License](#license)\n\n## Challenges\n\n[Image Credits](#credits)\n\n\u003Cbr\u002F>\n\u003Cp>\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fmaster\u002Fimages\u002Farrays_nltk.png\">\n\u003C\u002Fp>\n\u003Cbr\u002F>\n\n### Arrays and Strings\n\n[![Binder](https:\u002F\u002Fmybinder.org\u002Fbadge_logo.svg)](https:\u002F\u002Fmybinder.org\u002Fv2\u002Fgh\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fmaster)\n\n| Challenge | Static Notebook |\n|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| Determine if a string contains unique characters | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Farrays_strings\u002Funique_chars\u002Funique_chars_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Farrays_strings\u002Funique_chars\u002Funique_chars_solution.ipynb) |\n| Determine if a string is a permutation of another | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Farrays_strings\u002Fpermutation\u002Fpermutation_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Farrays_strings\u002Fpermutation\u002Fpermutation_solution.ipynb) |\n| Determine if a string is a rotation of another | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Farrays_strings\u002Frotation\u002Frotation_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Farrays_strings\u002Frotation\u002Frotation_solution.ipynb) |\n| Compress a string | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Farrays_strings\u002Fcompress\u002Fcompress_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Farrays_strings\u002Fcompress\u002Fcompress_solution.ipynb) |\n| Reverse characters in a string | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Farrays_strings\u002Freverse_string\u002Freverse_string_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Farrays_strings\u002Freverse_string\u002Freverse_string_solution.ipynb) |\n| Given two strings, find the single different char | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Farrays_strings\u002Fstr_diff\u002Fstr_diff_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Farrays_strings\u002Fstr_diff\u002Fstr_diff_solution.ipynb) |\n| Find two indices that sum to a specific value | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Farrays_strings\u002Ftwo_sum\u002Ftwo_sum_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Farrays_strings\u002Ftwo_sum\u002Ftwo_sum_solution.ipynb) |\n| Implement a hash table | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Farrays_strings\u002Fhash_map\u002Fhash_map_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Farrays_strings\u002Fhash_map\u002Fhash_map_solution.ipynb) |\n| Implement fizz buzz | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Farrays_strings\u002Ffizz_buzz\u002Ffizz_buzz_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Farrays_strings\u002Ffizz_buzz\u002Ffizz_buzz_solution.ipynb) |\n| Find the first non-repeated character in a string | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n| Remove specified characters in a string | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n| Reverse words in a string | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n| Convert a string to an integer | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n| Convert an integer to a string | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n| Add a challenge | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n\n\u003Cbr\u002F>\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fmaster\u002Fimages\u002Flinked_lists_wikipedia.png\">\n\u003C\u002Fp>\n\u003Cbr\u002F>\n\n### Linked Lists\n\n[![Binder](https:\u002F\u002Fmybinder.org\u002Fbadge_logo.svg)](https:\u002F\u002Fmybinder.org\u002Fv2\u002Fgh\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fmaster)\n\n| Challenge | Static Notebook |\n|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| Remove duplicates from a linked list | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Flinked_lists\u002Fremove_duplicates\u002Fremove_duplicates_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Flinked_lists\u002Fremove_duplicates\u002Fremove_duplicates_solution.ipynb) |\n| Find the kth to last element of a linked list | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Flinked_lists\u002Fkth_to_last_elem\u002Fkth_to_last_elem_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Flinked_lists\u002Fkth_to_last_elem\u002Fkth_to_last_elem_solution.ipynb) |\n| Delete a node in the middle of a linked list | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Flinked_lists\u002Fdelete_mid\u002Fdelete_mid_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Flinked_lists\u002Fdelete_mid\u002Fdelete_mid_solution.ipynb) |\n| Partition a linked list around a given value | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Flinked_lists\u002Fpartition\u002Fpartition_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Flinked_lists\u002Fpartition\u002Fpartition_solution.ipynb) |\n| Add two numbers whose digits are stored in a linked list | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Flinked_lists\u002Fadd_reverse\u002Fadd_reverse_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Flinked_lists\u002Fadd_reverse\u002Fadd_reverse_solution.ipynb) |\n| Find the start of a linked list loop | [Challenge](http:\u002F\u002Fnbviewer.jupyter.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Flinked_lists\u002Ffind_loop_start\u002Ffind_loop_start_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Flinked_lists\u002Ffind_loop_start\u002Ffind_loop_start_solution.ipynb) |\n| Determine if a linked list is a palindrome | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Flinked_lists\u002Fpalindrome\u002Fpalindrome_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Flinked_lists\u002Fpalindrome\u002Fpalindrome_solution.ipynb) |\n| Implement a linked list | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Flinked_lists\u002Flinked_list\u002Flinked_list_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Flinked_lists\u002Flinked_list\u002Flinked_list_solution.ipynb) |\n| Determine if a list is cyclic or acyclic | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n| Add a challenge | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n\n\u003Cbr\u002F>\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fmaster\u002Fimages\u002Fstack_queue_wikipedia.png\">\n\u003C\u002Fp>\n\u003Cbr\u002F>\n\n### Stacks and Queues\n\n[![Binder](https:\u002F\u002Fmybinder.org\u002Fbadge_logo.svg)](https:\u002F\u002Fmybinder.org\u002Fv2\u002Fgh\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fmaster)\n\n| Challenge | Static Notebook |\n|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| Implement n stacks using a single array | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fstacks_queues\u002Fn_stacks\u002Fn_stacks_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fstacks_queues\u002Fn_stacks\u002Fn_stacks_solution.ipynb) |\n| Implement a stack that keeps track of its minimum element | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fstacks_queues\u002Fstack_min\u002Fstack_min_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fstacks_queues\u002Fstack_min\u002Fstack_min_solution.ipynb) |\n| Implement a set of stacks class that wraps a list of capacity-bounded stacks | [Challenge](http:\u002F\u002Fnbviewer.jupyter.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fstacks_queues\u002Fset_of_stacks\u002Fset_of_stacks_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fstacks_queues\u002Fset_of_stacks\u002Fset_of_stacks_solution.ipynb) |\n| Implement a queue using two stacks | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fstacks_queues\u002Fqueue_from_stacks\u002Fqueue_from_stacks_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fstacks_queues\u002Fqueue_from_stacks\u002Fqueue_from_stacks_solution.ipynb) |\n| Sort a stack using another stack as a buffer | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fstacks_queues\u002Fsort_stack\u002Fsort_stack_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fstacks_queues\u002Fsort_stack\u002Fsort_stack_solution.ipynb) |\n| Implement a stack | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fstacks_queues\u002Fstack\u002Fstack_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fstacks_queues\u002Fstack\u002Fstack_solution.ipynb) |\n| Implement a queue | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fstacks_queues\u002Fqueue_list\u002Fqueue_list_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fstacks_queues\u002Fqueue_list\u002Fqueue_list_solution.ipynb) |\n| Implement a priority queue backed by an array | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Farrays_strings\u002Fpriority_queue\u002Fpriority_queue_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Farrays_strings\u002Fpriority_queue\u002Fpriority_queue_solution.ipynb) |\n| Add a challenge | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n\n\u003Cbr\u002F>\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fmaster\u002Fimages\u002Fbinary_tree_wikipedia.png\">\n\u003C\u002Fp>\n\u003Cbr\u002F>\n\n### Graphs and Trees\n\n[![Binder](https:\u002F\u002Fmybinder.org\u002Fbadge_logo.svg)](https:\u002F\u002Fmybinder.org\u002Fv2\u002Fgh\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fmaster)\n\n| Challenge | Static Notebooks |\n|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| Implement depth-first search (pre-, in-, post-order) on a tree |  [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Ftree_dfs\u002Fdfs_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Ftree_dfs\u002Fdfs_solution.ipynb) |\n| Implement breadth-first search on a tree | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Ftree_bfs\u002Fbfs_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Ftree_bfs\u002Fbfs_solution.ipynb) |\n| Determine the height of a tree | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Ftree_height\u002Fheight_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Ftree_height\u002Fheight_solution.ipynb) |\n| Create a binary search tree with minimal height from a sorted array | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fbst_min\u002Fbst_min_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fbst_min\u002Fbst_min_solution.ipynb) |\n| Create a linked list for each level of a binary tree | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Ftree_level_lists\u002Ftree_level_lists_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Ftree_level_lists\u002Ftree_level_lists_solution.ipynb) |\n| Check if a binary tree is balanced | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fcheck_balance\u002Fcheck_balance_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fcheck_balance\u002Fcheck_balance_solution.ipynb) |\n| Determine if a tree is a valid binary search tree | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fbst_validate\u002Fbst_validate_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fbst_validate\u002Fbst_validate_solution.ipynb) |\n| Find the in-order successor of a given node in a binary search tree | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fbst_successor\u002Fbst_successor_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fbst_successor\u002Fbst_successor_solution.ipynb) |\n| Find the second largest node in a binary search tree | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fbst_second_largest\u002Fbst_second_largest_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fbst_second_largest\u002Fbst_second_largest_solution.ipynb) |\n| Find the lowest common ancestor | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Ftree_lca\u002Ftree_lca_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Ftree_lca\u002Ftree_lca_solution.ipynb) |\n| Invert a binary tree | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Finvert_tree\u002Finvert_tree_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Finvert_tree\u002Finvert_tree_solution.ipynb) |\n| Implement a binary search tree | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fbst\u002Fbst_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fbst\u002Fbst_solution.ipynb) |\n| Implement a min heap | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fmin_heap\u002Fmin_heap_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fmin_heap\u002Fmin_heap_solution.ipynb) |\n| Implement a trie | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Ftrie\u002Ftrie_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Ftrie\u002Ftrie_solution.ipynb) |\n| Implement depth-first search on a graph |  [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fgraph_dfs\u002Fdfs_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fgraph_dfs\u002Fdfs_solution.ipynb) |\n| Implement breadth-first search on a graph | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fgraph_bfs\u002Fbfs_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fgraph_bfs\u002Fbfs_solution.ipynb) |\n| Determine if there is a path between two nodes in a graph | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fgraph_path_exists\u002Fpath_exists_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fgraph_path_exists\u002Fpath_exists_solution.ipynb) |\n| Implement a graph | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fgraph\u002Fgraph_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fgraph\u002Fgraph_solution.ipynb) |\n| Find a build order given a list of projects and dependencies. |  [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fgraph_build_order\u002Fbuild_order_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fgraph_build_order\u002Fbuild_order_solution.ipynb) |\n| Find the shortest path in a weighted graph. |  [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fgraph_shortest_path\u002Fgraph_shortest_path_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fgraph_shortest_path\u002Fgraph_shortest_path_solution.ipynb) |\n| Find the shortest path in an unweighted graph. |  [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fgraph_shortest_path_unweighted\u002Fshortest_path_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fgraphs_trees\u002Fgraph_shortest_path_unweighted\u002Fshortest_path_solution.ipynb) |\n| Add a challenge | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n\n\u003Cbr\u002F>\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fupload.wikimedia.org\u002Fwikipedia\u002Fcommons\u002F6\u002F6a\u002FSorting_quicksort_anim.gif\">\n\u003C\u002Fp>\n\u003Cbr\u002F>\n\n### Sorting\n\n[![Binder](https:\u002F\u002Fmybinder.org\u002Fbadge_logo.svg)](https:\u002F\u002Fmybinder.org\u002Fv2\u002Fgh\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fmaster)\n\n| Challenge | Static Notebooks |\n|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| Implement selection sort | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Fselection_sort\u002Fselection_sort_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Fselection_sort\u002Fselection_sort_solution.ipynb) |\n| Implement insertion sort | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Finsertion_sort\u002Finsertion_sort_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Finsertion_sort\u002Finsertion_sort_solution.ipynb) |\n| Implement quick sort | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Fquick_sort\u002Fquick_sort_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Fquick_sort\u002Fquick_sort_solution.ipynb) |\n| Implement merge sort | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Fmerge_sort\u002Fmerge_sort_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Fmerge_sort\u002Fmerge_sort_solution.ipynb) |\n| Implement radix sort | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Fradix_sort\u002Fradix_sort_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Fradix_sort\u002Fradix_sort_solution.ipynb) |\n| Sort an array of strings so all anagrams are next to each other | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Fanagrams\u002Fanagrams_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Fanagrams\u002Fanagrams_solution.ipynb) |\n| Find an item in a sorted, rotated array | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Frotated_array_search\u002Frotated_array_search_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Frotated_array_search\u002Frotated_array_search_solution.ipynb) |\n| Search a sorted matrix for an item | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Fsearch_sorted_matrix\u002Fsearch_sorted_matrix_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Fsearch_sorted_matrix\u002Fsearch_sorted_matrix_solution.ipynb) |\n| Find an int not in an input of n integers | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Fnew_int\u002Fnew_int_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Fnew_int\u002Fnew_int_solution.ipynb) |\n|  Given sorted arrays A, B, merge B into A in sorted order | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Fmerge_into\u002Fmerge_into_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fsorting_searching\u002Fmerge_into\u002Fmerge_into_solution.ipynb) |\n| Implement a stable selection sort | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n| Make an unstable sort stable | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n| Implement an efficient, in-place version of quicksort | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n| Given two sorted arrays, merge one into the other in sorted order | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n| Find an element in a rotated and sorted array of integers | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n| Add a challenge | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n\n\u003Cbr\u002F>\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fmaster\u002Fimages\u002Ffibonacci_wikipedia.png\">\n\u003C\u002Fp>\n\u003Cbr\u002F>\n\n### Recursion and Dynamic Programming\n\n[![Binder](https:\u002F\u002Fmybinder.org\u002Fbadge_logo.svg)](https:\u002F\u002Fmybinder.org\u002Fv2\u002Fgh\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fmaster)\n\n| Challenge | Static Notebooks |\n|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| Implement fibonacci recursively, dynamically, and iteratively | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Ffibonacci\u002Ffibonacci_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Ffibonacci\u002Ffibonacci_solution.ipynb) |\n| Maximize items placed in a knapsack | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fknapsack_01\u002Fknapsack_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fknapsack_01\u002Fknapsack_solution.ipynb) |\n| Maximize unbounded items placed in a knapsack | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fknapsack_unbounded\u002Fknapsack_unbounded_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fknapsack_unbounded\u002Fknapsack_unbounded_solution.ipynb) |\n| Find the longest common subsequence | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Flongest_common_subsequence\u002Flongest_common_subseq_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Flongest_common_subsequence\u002Flongest_common_subseq_solution.ipynb) |\n| Find the longest increasing subsequence | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Flongest_inc_subseq\u002Flongest_inc_subseq_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Flongest_inc_subseq\u002Flongest_inc_subseq_solution.ipynb) |\n| Minimize the cost of matrix multiplication | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fmatrix_mult\u002Ffind_min_cost_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fmatrix_mult\u002Ffind_min_cost_solution.ipynb) |\n| Maximize stock prices given k transactions | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fmax_profit_k\u002Fmax_profit_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fmax_profit_k\u002Fmax_profit_solution.ipynb) |\n| Find the minimum number of ways to represent n cents given an array of coins | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fcoin_change_min\u002Fcoin_change_min_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fcoin_change_min\u002Fcoin_change_min_solution.ipynb) |\n| Find the unique number of ways to represent n cents given an array of coins | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fcoin_change\u002Fcoin_change_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fcoin_change\u002Fcoin_change_solution.ipynb) |\n| Print all valid combinations of n-pairs of parentheses | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fn_pairs_parentheses\u002Fn_pairs_parentheses_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fn_pairs_parentheses\u002Fn_pairs_parentheses_solution.ipynb) |\n| Navigate a maze | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fgrid_path\u002Fgrid_path_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fgrid_path\u002Fgrid_path_solution.ipynb) |\n| Print all subsets of a set | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fpower_set\u002Fpower_set_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fpower_set\u002Fpower_set_solution.ipynb) |\n| Print all permutations of a string | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fpermutations\u002Fpermutations_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fpermutations\u002Fpermutations_solution.ipynb) |\n| Find the magic index in an array | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fmagic_index\u002Fmagic_index_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fmagic_index\u002Fmagic_index_solution.ipynb) |\n| Find the number of ways to run up n steps | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fsteps\u002Fsteps_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fsteps\u002Fsteps_solution.ipynb) |\n| Implement the Towers of Hanoi with 3 towers and N disks | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fhanoi\u002Fhanoi_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Frecursion_dynamic\u002Fhanoi\u002Fhanoi_solution.ipynb) |\n| Implement factorial recursively, dynamically, and iteratively | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n| Perform a binary search on a sorted array of integers | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n| Print all combinations of a string | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n| Implement a paint fill function | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n| Find all permutations to represent n cents, given 1, 5, 10, 25 cent coins | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n| Add a challenge | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n\n\u003Cbr\u002F>\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fmaster\u002Fimages\u002Fprobability_distribution_wikipedia.png\">\n\u003C\u002Fp>\n\u003Cbr\u002F>\n\n### Mathematics and Probability\n\n[![Binder](https:\u002F\u002Fmybinder.org\u002Fbadge_logo.svg)](https:\u002F\u002Fmybinder.org\u002Fv2\u002Fgh\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fmaster)\n\n| Challenge | Static Notebooks |\n|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| Generate a list of primes | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fmath_probability\u002Fgenerate_primes\u002Fcheck_prime_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fmath_probability\u002Fgenerate_primes\u002Fcheck_prime_solution.ipynb) |\n| Find the digital root | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fmath_probability\u002Fadd_digits\u002Fadd_digits_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fmath_probability\u002Fadd_digits\u002Fadd_digits_solution.ipynb) |\n| Create a class supporting insert, max, min, mean, mode in O(1) | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fmath_probability\u002Fmath_ops\u002Fmath_ops_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fmath_probability\u002Fmath_ops\u002Fmath_ops_solution.ipynb) |\n| Determine if a number is a power of two | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fmath_probability\u002Fpower_two\u002Fpower_two_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fmath_probability\u002Fpower_two\u002Fpower_two_solution.ipynb) |\n| Add two numbers without the + or - sign | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fmath_probability\u002Fsum_two\u002Fsum_two_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fmath_probability\u002Fsum_two\u002Fsum_two_solution.ipynb) |\n| Subtract two numbers without the + or - sign | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fmath_probability\u002Fsub_two\u002Fsub_two_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fmath_probability\u002Fsub_two\u002Fsub_two_solution.ipynb) |\n| Check if a number is prime | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n| Determine if two lines on a Cartesian plane intersect | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n| Using only add, implement multiply, subtract, and divide for ints | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n| Find the kth number such that the only prime factors are 3, 5, and 7 | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n| Add a challenge | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n\n\u003Cbr\u002F>\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fmaster\u002Fimages\u002Fbit_manipulation_wikipedia.png\">\n\u003C\u002Fp>\n\u003Cbr\u002F>\n\n### Bit Manipulation\n\n[![Binder](https:\u002F\u002Fmybinder.org\u002Fbadge_logo.svg)](https:\u002F\u002Fmybinder.org\u002Fv2\u002Fgh\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fmaster)\n\n| Challenge | Static Notebooks |\n|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| Implement common bit manipulation operations | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fbit_manipulation\u002Fbit\u002Fbit_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fbit_manipulation\u002Fbit\u002Fbit_solution.ipynb) |\n| Determine number of bits to flip to convert a into b | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fbit_manipulation\u002Fbits_to_flip\u002Fbits_to_flip_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fbit_manipulation\u002Fbits_to_flip\u002Fbits_to_flip_solution.ipynb) |\n| Draw a line on a screen | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fbit_manipulation\u002Fdraw_line\u002Fdraw_line_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fbit_manipulation\u002Fdraw_line\u002Fdraw_line_solution.ipynb) |\n| Flip a bit to maximize the longest sequence of 1s | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fbit_manipulation\u002Fflip_bit\u002Fflip_bit_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fbit_manipulation\u002Fflip_bit\u002Fflip_bit_solution.ipynb) |\n| Get the next largest and next smallest numbers | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fbit_manipulation\u002Fget_next\u002Fget_next_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fbit_manipulation\u002Fget_next\u002Fget_next_solution.ipynb) |\n| Merge two binary numbers | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fbit_manipulation\u002Finsert_m_into_n\u002Finsert_m_into_n_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fbit_manipulation\u002Finsert_m_into_n\u002Finsert_m_into_n_solution.ipynb) |\n| Swap odd and even bits in an integer | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fbit_manipulation\u002Fpairwise_swap\u002Fpairwise_swap_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fbit_manipulation\u002Fpairwise_swap\u002Fpairwise_swap_solution.ipynb) |\n| Print the binary representation of a number between 0 and 1 | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fbit_manipulation\u002Fprint_binary\u002Fprint_binary_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fbit_manipulation\u002Fprint_binary\u002Fprint_binary_solution.ipynb) |\n| Determine the number of 1s in the binary representation of a given integer | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n| Add a challenge | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n\n\u003Cbr\u002F>\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fmaster\u002Fimages\u002Flogo_topcoder.png\">\n\u003C\u002Fp>\n\u003Cbr\u002F>\n\n### Online Judges\n\n[![Binder](https:\u002F\u002Fmybinder.org\u002Fbadge_logo.svg)](https:\u002F\u002Fmybinder.org\u002Fv2\u002Fgh\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fmaster)\n\n| Challenge | Static Notebooks |\n|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|\n| Find the longest substring with at most k distinct chars | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Flongest_substr_k_distinct\u002Flongest_substr_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Flongest_substr_k_distinct\u002Flongest_substr_solution.ipynb) |\n| Find the highest product of three numbers | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Fprod_three\u002Fprod_three_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Fprod_three\u002Fprod_three_solution.ipynb) |\n| Maximize stocks profit from 1 buy and 1 sell | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Fmax_profit\u002Fmax_profit_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Fmax_profit\u002Fmax_profit_solution.ipynb) |\n| Move all zeroes in a list to the end | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Fmove_zeroes\u002Fmove_zeroes_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Fmove_zeroes\u002Fmove_zeroes_solution.ipynb) |\n| Find the products of every other int | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Fmult_other_numbers\u002Fmult_other_numbers_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Fmult_other_numbers\u002Fmult_other_numbers_solution.ipynb) |\n| Given a list of entries and exits, find the busiest period | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Fbusiest_period\u002Fbusiest_period_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Fbusiest_period\u002Fbusiest_period_solution.ipynb) |\n| Determine an island's perimeter | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Fisland_perimeter\u002Fisland_perimeter_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Fisland_perimeter\u002Fisland_perimeter_solution.ipynb) |\n| Format license keys | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Flicense_key\u002Fformat_license_key_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Flicense_key\u002Fformat_license_key_solution.ipynb) |\n| Find the longest absolute file path | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Flongest_abs_file_path\u002Flongest_path_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Flongest_abs_file_path\u002Flongest_path_solution.ipynb) |\n| Merge tuple ranges | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Fmerge_ranges\u002Fmerge_ranges_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Fmerge_ranges\u002Fmerge_ranges_solution.ipynb) |\n| Assign cookies | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Fassign_cookies\u002Fassign_cookies_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Fassign_cookies\u002Fassign_cookies_solution.ipynb) |\n| Determine if you can win in Nim | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Fnim\u002Fnim_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Fnim\u002Fnim_solution.ipynb) |\n| Check if a magazine could have been used to create a ransom note | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Fransom_note\u002Fransom_note_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Fransom_note\u002Fransom_note_solution.ipynb) |\n| Find the number of times a sentence can fit on a screen | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Fsentence_screen_fit\u002Fsentence_screen_fit_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Fsentence_screen_fit\u002Fsentence_screen_fit_solution.ipynb) |\n| Utopian tree | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Futopian_tree\u002Futopian_tree_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Futopian_tree\u002Futopian_tree_solution.ipynb) |\n| Maximizing xor | [Challenge](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Fmaximizing_xor\u002Fmaximizing_xor_challenge.ipynb) │ [Solution](http:\u002F\u002Fnbviewer.ipython.org\u002Fgithub\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002Fonline_judges\u002Fmaximizing_xor\u002Fmaximizing_xor_solution.ipynb) |\n| Add a challenge | [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) │ [Contribute](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) |\n\n## Repo Structure\n\n```\ninteractive-coding-challenges        # Repo\n├─ arrays_strings                    # Category of challenges\n│  ├─ rotation                       # Challenge folder\n│  │  ├─ rotation_challenge.ipynb    # Challenge notebook\n│  │  ├─ rotation_solution.ipynb     # Solution notebook\n│  │  ├─ test_rotation.py            # Unit test*\n│  ├─ compress\n│  │  ├─ compress_challenge.ipynb\n│  │  ├─ compress_solution.ipynb\n│  │  ├─ test_compress.py\n│  ├─ ...\n├─ linked_lists\n│  ├─ palindrome\n│  │  └─ ...\n│  ├─ ...\n├─ ...\n```\n\n\u003Ci>\\*The notebooks (.ipynb) read\u002Fwrite the associated unit test (.py) file.\u003C\u002Fi>\n\n\n## Notebook Installation\n\n### Zero Install\n\n[![Binder](https:\u002F\u002Fmybinder.org\u002Fbadge_logo.svg)](https:\u002F\u002Fmybinder.org\u002Fv2\u002Fgh\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fmaster)\n\nThis README contains links to [Binder](https:\u002F\u002Fmybinder.org\u002Fv2\u002Fgh\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fmaster) , which hosts **dynamic notebooks** of the repo's contents online with no installation needed.\n\n### Jupyter Notebook\n\nRun:\n\n```\npip install jupyter\n```\n\nFor detailed instructions, scripts, and tools to more optimally set up your development environment, check out the [dev-setup](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Fdev-setup) repo.\n\nFor more details on notebook installation, follow the directions [here](http:\u002F\u002Fipython.org\u002Finstall.html).\n\nMore information on IPython\u002FJupyter Notebooks can be found [here](http:\u002F\u002Fipython.org\u002Fnotebook.html).\n\n## Running Challenges\n\n### Notebooks\n\nChallenges are provided in the form of **IPython\u002FJupyter Notebooks** and have been **tested with Python 2.7 and Python 3.x**.\n\n*If you need to install IPython\u002FJupyter Notebook, see the [Notebook Installation](#notebook-installation) section.*\n\n* This README contains links to [nbviewer](http:\u002F\u002Fnbviewer.ipython.org), which hosts **static notebooks** of the repo's contents\n* To interact with or to modify elements within the **dynamic notebooks**, refer to the instructions below\n\nRun the notebook of challenges:\n\n```\n$ git clone https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges.git\n$ cd interactive-coding-challenges\n$ jupyter notebook\n```\n\nThis will launch your web browser with the list of challenge categories:\n\n* Navigate to the **Challenge Notebook** you wish to solve\n* Run the cells within the challenge notebook (Cell->Run All)\n    * This will result in an expected unit test error\n* Solve the challenge and verify it passes the unit test\n* Check out the accompanying **Solution Notebook** for further discussion\n\nTo **debug** your solution with pdb, refer to the following [ticket](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fissues\u002F11).\n\nNote: 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](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) for details.\n\n## Future Development\n\nChallenges, solutions, and unit tests are presented in the form of **IPython\u002FJupyter Notebooks**.\n\n* 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](https:\u002F\u002Fgithub.com\u002Fipython\u002Fipython\u002Fwiki\u002FIPython-kernels-for-other-languages)\n* Repo will be **continually updated** with new solutions and challenges\n* [Contributions](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) are welcome!\n\n## Contributing\n\nContributions are welcome!\n\nReview the [Contributing Guidelines](https:\u002F\u002Fgithub.com\u002Fdonnemartin\u002Finteractive-coding-challenges\u002Fblob\u002Fmaster\u002FCONTRIBUTING.md) for details on how to:\n\n* Submit issues\n* Add solutions to existing challenges\n* Add new challenges\n\n## Credits\n\n### Resources\n\n* [Cracking the Coding Interview](http:\u002F\u002Fwww.amazon.com\u002FCracking-Coding-Interview-Programming-Questions\u002Fdp\u002F098478280X) | [GitHub Solutions](https:\u002F\u002Fgithub.com\u002Fgaylemcd\u002Fctci)\n* [Programming Interviews Exposed](http:\u002F\u002Fwww.amazon.com\u002Fgp\u002Fproduct\u002F1118261364\u002F)\n* [The Algorithm Design Manual](http:\u002F\u002Fwww.amazon.com\u002FAlgorithm-Design-Manual-Steve-Skiena\u002Fdp\u002F0387948600) | [Solutions](http:\u002F\u002Fwww.algorithm.cs.sunysb.edu\u002Falgowiki\u002Findex.php\u002FThe_Algorithms_Design_Manual_(Second_Edition))\n* [CareerCup](http:\u002F\u002Fwww.careercup.com\u002F)\n* [Quora](http:\u002F\u002Fwww.quora.com\u002F)\n* [HackerRank](https:\u002F\u002Fwww.hackerrank.com)\n* [LeetCode](https:\u002F\u002Fleetcode.com\u002F)\n\n### Images\n\n* [Arrays and Strings: nltk.org](http:\u002F\u002Fwww.nltk.org\u002Fimages\u002Fstring-slicing.png)\n* [Linked Lists: wikipedia.org](https:\u002F\u002Fupload.wikimedia.org\u002Fwikipedia\u002Fcommons\u002F6\u002F6d\u002FSingly-linked-list.svg)\n* [Stacks: wikipedia.org](https:\u002F\u002Fupload.wikimedia.org\u002Fwikipedia\u002Fcommons\u002F2\u002F29\u002FData_stack.svg)\n* [Queues: wikipedia.org](https:\u002F\u002Fupload.wikimedia.org\u002Fwikipedia\u002Fcommons\u002F5\u002F52\u002FData_Queue.svg)\n* [Sorting: wikipedia.org](https:\u002F\u002Fupload.wikimedia.org\u002Fwikipedia\u002Fcommons\u002F6\u002F6a\u002FSorting_quicksort_anim.gif)\n* [Recursion and Dynamic Programming: wikipedia.org](https:\u002F\u002Fupload.wikimedia.org\u002Fwikipedia\u002Fcommons\u002Fb\u002Fbf\u002FPascalTriangleFibanacci.svg)\n* [Graphs and Trees: wikipedia.org](https:\u002F\u002Fupload.wikimedia.org\u002Fwikipedia\u002Fcommons\u002Ff\u002Ff7\u002FBinary_tree.svg)\n* [Mathematics ","interactive-coding-challenges 是一个包含120多个Python编码挑战的项目，专注于算法和数据结构，旨在帮助开发者准备编程面试。该项目的核心功能包括完全可运行且经过单元测试的参考解决方案、详细的约束条件、测试案例以及算法的时间和空间复杂度分析。此外，它还提供了Anki闪卡来辅助记忆关键概念。此项目非常适合正在为技术面试做准备的程序员，特别是那些需要加强算法理解和数据结构应用能力的人。通过提供互动性强且易于理解的学习材料，该资源能够有效地支持个人在算法学习与实践方面的需求。",2,"2026-06-11 02:47:58","top_all"]