mirror of
https://github.com/donnemartin/interactive-coding-challenges.git
synced 2024-03-22 13:11:13 +08:00
Updated repo name.
This commit is contained in:
parent
306805e376
commit
0923fa3d1c
|
@ -7,11 +7,11 @@ Please carefully read this page before submitting a pull request.
|
|||
|
||||
## Bug Reports
|
||||
|
||||
For bug reports or requests [submit an issue](https://github.com/donnemartin/coding-challenges/issues).
|
||||
For bug reports or requests [submit an issue](https://github.com/donnemartin/interactive-coding-challenges/issues).
|
||||
|
||||
## Pull Requests
|
||||
|
||||
**Please follow the general [Repo Structure](https://github.com/donnemartin/coding-challenges#repo-structure) and [Notebook Structure](https://github.com/donnemartin/coding-challenges#notebook-structure) before submitting your pull request.**
|
||||
**Please follow the general [Repo Structure](https://github.com/donnemartin/interactive-coding-challenges#repo-structure) and [Notebook Structure](https://github.com/donnemartin/interactive-coding-challenges#notebook-structure) before submitting your pull request.**
|
||||
|
||||
### GitHub Pull Requests Docs
|
||||
|
||||
|
@ -19,7 +19,7 @@ If you are not familiar with pull requests, review the [pull request docs](https
|
|||
|
||||
### Notebook Installation
|
||||
|
||||
Refer to [Accessing the Challenges](https://github.com/donnemartin/coding-challenges#accessing-the-challenges), [Notebook Installation](https://github.com/donnemartin/coding-challenges#notebook-installation), and [Nose Installation](https://github.com/donnemartin/coding-challenges#nose-installation) to set up your local environment.
|
||||
Refer to [Accessing the Challenges](https://github.com/donnemartin/interactive-coding-challenges#accessing-the-challenges), [Notebook Installation](https://github.com/donnemartin/interactive-coding-challenges#notebook-installation), and [Nose Installation](https://github.com/donnemartin/interactive-coding-challenges#nose-installation) to set up your local environment.
|
||||
|
||||
### Adding New Solutions to Existing Challenges
|
||||
|
||||
|
@ -34,13 +34,13 @@ The README contains several sample challenges that are not yet implemented.
|
|||
* The sample challenges are only suggestions, please do not limit yourself to only these topics
|
||||
* Feel free to send pull requests on different challenges or categories of challenges
|
||||
* Try to keep the "Challenge" title relatively short and expand on the details within the notebook
|
||||
* Review the [Repo Structure](https://github.com/donnemartin/coding-challenges#repo-structure) and [Notebook Structure](https://github.com/donnemartin/coding-challenges#notebook-structure) sections
|
||||
* Check out the [template challenge and solution notebooks](https://github.com/donnemartin/coding-challenges/templates/) to help you get started
|
||||
* Review the [Repo Structure](https://github.com/donnemartin/interactive-coding-challenges#repo-structure) and [Notebook Structure](https://github.com/donnemartin/interactive-coding-challenges#notebook-structure) sections
|
||||
* Check out the [template challenge and solution notebooks](https://github.com/donnemartin/interactive-coding-challenges/templates/) to help you get started
|
||||
|
||||
| Challenge | Static Notebooks |
|
||||
|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Check if a number is prime | [Contribute](https://github.com/donnemartin/coding-challenges#contributing)│[Contribute](https://github.com/donnemartin/coding-challenges#contributing) |
|
||||
| Generate a list of primes | [Contribute](https://github.com/donnemartin/coding-challenges#contributing)│[Contribute](https://github.com/donnemartin/coding-challenges#contributing) |
|
||||
| Check if a number is prime | [Contribute](https://github.com/donnemartin/interactive-coding-challenges#contributing)│[Contribute](https://github.com/donnemartin/interactive-coding-challenges#contributing) |
|
||||
| Generate a list of primes | [Contribute](https://github.com/donnemartin/interactive-coding-challenges#contributing)│[Contribute](https://github.com/donnemartin/interactive-coding-challenges#contributing) |
|
||||
|
||||
Update the list of challenges in the README so we can enjoy your challenge!
|
||||
|
||||
|
@ -48,7 +48,7 @@ Update the list of challenges in the README so we can enjoy your challenge!
|
|||
|
||||
When contributing to a notebook, update the notebook author(s):
|
||||
|
||||
<small><i>This notebook was prepared by [Joe](https://github.com/Joe) and [Jane](https://github.com/Jane). Source and license info is on [GitHub](https://github.com/donnemartin/coding-challenges).</i></small>
|
||||
<small><i>This notebook was prepared by [Joe](https://github.com/Joe) and [Jane](https://github.com/Jane). Source and license info is on [GitHub](https://github.com/donnemartin/interactive-coding-challenges).</i></small>
|
||||
|
||||
### Maintain Consistent Style
|
||||
|
||||
|
|
64
README.md
64
README.md
|
@ -4,7 +4,7 @@
|
|||
<i>Wikipedia: Quicksort</i>
|
||||
</p>
|
||||
|
||||
coding-challenges
|
||||
interactive-coding-challenges
|
||||
============
|
||||
|
||||
Continually updated Python Notebooks containing TDD-based coding challenges and solutions (algorithms and data structures).
|
||||
|
@ -31,54 +31,54 @@ Continually updated Python Notebooks containing TDD-based coding challenges and
|
|||
|
||||
| Notebook | Problem Statement |
|
||||
|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [unique_chars](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/arrays_strings/unique_chars/unique_chars_solution.ipynb) | Determine if a string contains unique characters |
|
||||
| [reverse_string](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/arrays_strings/reverse_string/reverse_string_solution.ipynb) | Reverse characters in a string |
|
||||
| [permutation](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/arrays_strings/permutation/permutation_solution.ipynb) | Determine if a string is a permutation of another |
|
||||
| [replace_char](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/arrays_strings/replace_char/replace_char_solution.ipynb) | Encode spaces in a string in-place |
|
||||
| [compress](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/arrays_strings/compress/compress_solution.ipynb) | Compress a string |
|
||||
| [rotation](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/arrays_strings/rotation/rotation_solution.ipynb) | Determine if a string is a rotation of another |
|
||||
| [hash-map](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/arrays_strings/hash_map/hash_map_solution.ipynb) | Implement a hash table with set, get, and remove methods |
|
||||
| [unique_chars](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/arrays_strings/unique_chars/unique_chars_solution.ipynb) | Determine if a string contains unique characters |
|
||||
| [reverse_string](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/arrays_strings/reverse_string/reverse_string_solution.ipynb) | Reverse characters in a string |
|
||||
| [permutation](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/arrays_strings/permutation/permutation_solution.ipynb) | Determine if a string is a permutation of another |
|
||||
| [replace_char](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/arrays_strings/replace_char/replace_char_solution.ipynb) | Encode spaces in a string in-place |
|
||||
| [compress](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/arrays_strings/compress/compress_solution.ipynb) | Compress a string |
|
||||
| [rotation](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/arrays_strings/rotation/rotation_solution.ipynb) | Determine if a string is a rotation of another |
|
||||
| [hash-map](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/arrays_strings/hash_map/hash_map_solution.ipynb) | Implement a hash table with set, get, and remove methods |
|
||||
|
||||
## Linked Lists
|
||||
|
||||
| Notebook | Problem Statement |
|
||||
|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [remove_duplicates](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/linked_lists/remove_duplicates/remove_duplicates_solution.ipynb) | Remove duplicates from a linked list |
|
||||
| [kth_to_last_elem](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/linked_lists/kth_to_last_elem/kth_to_last_elem_solution.ipynb) | Find the kth to last element of a linked list |
|
||||
| [delete_mid](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/linked_lists/delete_mid/delete_mid_solution.ipynb) | Delete a node in the middle of a linked list, given access to only that node |
|
||||
| [partition](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/linked_lists/partition/partition_solution.ipynb) | Partition a linked list around a given value |
|
||||
| [add_reverse](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/linked_lists/add_reverse/add_reverse_solution.ipynb) | Add two numbers whose digits are stored in a linked list in reverse order |
|
||||
| [find_loop_start](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/linked_lists/find_loop_start/find_loop_start_solution.ipynb) | Find the start of a linked list loop |
|
||||
| [palindrome](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/linked_lists/palindrome/palindrome_solution.ipynb) | Determine if a linked list is a palindrome |
|
||||
| [linked_list](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/linked_lists/linked_list/linked_list_solution.ipynb) | Implement a linked list with insert, find, delete, and print methods |
|
||||
| [remove_duplicates](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/linked_lists/remove_duplicates/remove_duplicates_solution.ipynb) | Remove duplicates from a linked list |
|
||||
| [kth_to_last_elem](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/linked_lists/kth_to_last_elem/kth_to_last_elem_solution.ipynb) | Find the kth to last element of a linked list |
|
||||
| [delete_mid](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/linked_lists/delete_mid/delete_mid_solution.ipynb) | Delete a node in the middle of a linked list, given access to only that node |
|
||||
| [partition](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/linked_lists/partition/partition_solution.ipynb) | Partition a linked list around a given value |
|
||||
| [add_reverse](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/linked_lists/add_reverse/add_reverse_solution.ipynb) | Add two numbers whose digits are stored in a linked list in reverse order |
|
||||
| [find_loop_start](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/linked_lists/find_loop_start/find_loop_start_solution.ipynb) | Find the start of a linked list loop |
|
||||
| [palindrome](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/linked_lists/palindrome/palindrome_solution.ipynb) | Determine if a linked list is a palindrome |
|
||||
| [linked_list](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/linked_lists/linked_list/linked_list_solution.ipynb) | Implement a linked list with insert, find, delete, and print methods |
|
||||
|
||||
## Stacks and Queues
|
||||
|
||||
| Notebook | Problem Statement |
|
||||
|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [n_stacks](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/stacks_queues/n_stacks/n_stacks_solution.ipynb) | Implement n stacks using a single array |
|
||||
| [stack_min](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/stacks_queues/stack_min/stack_min_solution.ipynb) | Implement a stack that keeps track of its minimum element |
|
||||
| [set_of_stacks](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/stacks_queues/set_of_stacks/set_of_stacks_solution.ipynb) | Implement a set of stacks class that wraps a list of stacks, each bound by a capacity |
|
||||
| [hanoi](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/stacks_queues/hanoi/hanoi_solution.ipynb) | Implement the Towers of Hanoi with 3 towers and N disks |
|
||||
| [queue_from_stacks](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/stacks_queues/queue_from_stacks/queue_from_stacks_solution.ipynb) | Implement a queue using two stacks |
|
||||
| [sort_stack](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/stacks_queues/sort_stack/sort_stack_solution.ipynb) | Sort a stack using another stack as a buffer |
|
||||
| [stack](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/stacks_queues/stack/stack_solution.ipynb) | Implement a stack with push, pop, and peek methods using a linked list |
|
||||
| [queue](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/stacks_queues/queue_list/queue_list_solution.ipynb) | Implement a queue with enqueue and dequeue methods using a linked list |
|
||||
| [n_stacks](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/stacks_queues/n_stacks/n_stacks_solution.ipynb) | Implement n stacks using a single array |
|
||||
| [stack_min](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/stacks_queues/stack_min/stack_min_solution.ipynb) | Implement a stack that keeps track of its minimum element |
|
||||
| [set_of_stacks](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/stacks_queues/set_of_stacks/set_of_stacks_solution.ipynb) | Implement a set of stacks class that wraps a list of stacks, each bound by a capacity |
|
||||
| [hanoi](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/stacks_queues/hanoi/hanoi_solution.ipynb) | Implement the Towers of Hanoi with 3 towers and N disks |
|
||||
| [queue_from_stacks](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/stacks_queues/queue_from_stacks/queue_from_stacks_solution.ipynb) | Implement a queue using two stacks |
|
||||
| [sort_stack](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/stacks_queues/sort_stack/sort_stack_solution.ipynb) | Sort a stack using another stack as a buffer |
|
||||
| [stack](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/stacks_queues/stack/stack_solution.ipynb) | Implement a stack with push, pop, and peek methods using a linked list |
|
||||
| [queue](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/stacks_queues/queue_list/queue_list_solution.ipynb) | Implement a queue with enqueue and dequeue methods using a linked list |
|
||||
|
||||
## Sorting and Searching
|
||||
|
||||
| Notebook | Problem Statement |
|
||||
|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [selection_sort](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/sorting_searching/selection_sort/selection_sort_solution.ipynb#) | Implement selection sort |
|
||||
| [insertion_sort](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/sorting_searching/insertion_sort/insertion_sort_solution.ipynb#) | Implement insertion sort |
|
||||
| [quick_sort](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/sorting_searching/quick_sort/quick_sort_solution.ipynb#) | Implement quick sort |
|
||||
| [merge_sort](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/sorting_searching/merge_sort/merge_sort_solution.ipynb#) | Implement merge sort |
|
||||
| [selection_sort](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/sorting_searching/selection_sort/selection_sort_solution.ipynb#) | Implement selection sort |
|
||||
| [insertion_sort](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/sorting_searching/insertion_sort/insertion_sort_solution.ipynb#) | Implement insertion sort |
|
||||
| [quick_sort](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/sorting_searching/quick_sort/quick_sort_solution.ipynb#) | Implement quick sort |
|
||||
| [merge_sort](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/sorting_searching/merge_sort/merge_sort_solution.ipynb#) | Implement merge sort |
|
||||
|
||||
## Recursion and Dynamic Programming
|
||||
|
||||
| Notebook | Problem Statement |
|
||||
|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [fibonacci](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/recursion_dynamic/fibonacci/fibonacci_solution.ipynb#) | Implement fibonacci recursively, dynamically, and iteratively |
|
||||
| [fibonacci](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/recursion_dynamic/fibonacci/fibonacci_solution.ipynb#) | Implement fibonacci recursively, dynamically, and iteratively |
|
||||
|
||||
## Trees and Graphs
|
||||
|
||||
|
@ -100,8 +100,8 @@ Continually updated Python Notebooks containing TDD-based coding challenges and
|
|||
|
||||
| Notebook | Problem Statement |
|
||||
|--------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| [utopian_tree](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/online_judges/utopian_tree/utopian_tree_solution.ipynb) | [View problem statement on HackerRank](https://www.hackerrank.com/challenges/utopian-tree) |
|
||||
| [maximizing_xor](http://nbviewer.ipython.org/github/donnemartin/coding-challenges/blob/master/online_judges/maximizing_xor/maximizing_xor_solution.ipynb) | [View problem statement on HackerRank](https://www.hackerrank.com/challenges/maximizing-xor) |
|
||||
| [utopian_tree](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/online_judges/utopian_tree/utopian_tree_solution.ipynb) | [View problem statement on HackerRank](https://www.hackerrank.com/challenges/utopian-tree) |
|
||||
| [maximizing_xor](http://nbviewer.ipython.org/github/donnemartin/interactive-coding-challenges/blob/master/online_judges/maximizing_xor/maximizing_xor_solution.ipynb) | [View problem statement on HackerRank](https://www.hackerrank.com/challenges/maximizing-xor) |
|
||||
|
||||
## Notebook Installation
|
||||
|
||||
|
@ -122,7 +122,7 @@ For more details on installation, follow the directions [here.](http://ipython.o
|
|||
To interact with or to modify elements within the IPython notebooks, you must first clone or download the repository then run the ipython notebook. More information on IPython Notebooks can be found [here.](http://ipython.org/notebook.html)
|
||||
|
||||
```
|
||||
$ git clone https://github.com/donnemartin/coding-challenges.git
|
||||
$ git clone https://github.com/donnemartin/interactive-coding-challenges.git
|
||||
$ cd [downloaded repo directory name]
|
||||
$ ipython notebook
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue
Block a user