arrays-strings | ||
hacker-rank | ||
images | ||
linked-lists | ||
recursion-dynamic | ||
sorting-searching | ||
stacks-queues | ||
.gitignore | ||
LICENSE | ||
README.md |
Wikipedia: Quicksort, Merge Sort
algorithms-data-structures
Continually updated IPython Notebooks containing coding problems and solutions (algorithms and data structures).
Most solutions are in Python.
Index
- Arrays and Strings
- Linked Lists
- Stacks and Queues
- Sorting and Searching
- Recursion and Dynamic Programming
- Trees and Graphs
- Bit Manipulation
- Scalability and Memory Limits
- Concurrency
- Hacker Rank and TopCoder
- notebook-installation
- credits
- contact-info
- License
Arrays and Strings
- Determine if a string contains unique characters
- Reverse characters in a string
- Determine if a string is a permutation of another
- Encode spaces in a string in-place
- Compress a string
- Determine if a string is a rotation of another
- Implement a hash table with set, get, and remove methods
Linked Lists
- Implement a linked list with insert, find, delete, and print methods
- Remove duplicates from a linked list
- Find the kth to last element of a linked list
- Delete a node in the middle of a linked list, given access to only that node
- Partition a linked list around a given value
- Add two numbers whose digits are stored in a linked list in reverse order
- Find the start of a linked list loop
- Determine if a linked list is a palindrome
Stacks and Queues
- Implement a stack with push, pop, and peek methods using a linked list
- Implement a queue with enqueue and dequeue methods using a linked list
- Implement n stacks using a single array
- Implement a stack that keeps track of its minimum element
- Implement a set of stacks class that wraps a list of stacks, each bound by a capacity
- Implement the Towers of Hanoi with 3 towers and N disks
- Implement a queue using two stacks
- Sort a stack using another stack as a buffer
Sorting and Searching
Recursion and Dynamic Programming
Trees and Graphs
[Coming Soon]
Bit Manipulation
[Coming Soon]
Scalability and Memory Limits
[Coming Soon]
Concurrency
[Coming Soon]
Hacker Rank and TopCoder
notebook-installation
Anaconda is a free distribution of the Python programming language for large-scale data processing, predictive analytics, and scientific computing that aims to simplify package management and deployment.
Follow instructions to install Anaconda or the more lightweight miniconda.
To view interactive content 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.
$ git clone https://github.com/donnemartin/data-science-ipython-notebooks.git
$ cd [downloaded repo directory name]
$ ipython notebook
Credits
- Cracking the Coding Interview
- Programming Interviews Exposed
- Elements of Programming Interviews
- The Algorithm Design Manual
- Hacker Rank
- TopCoder
contact-info
Feel free to contact me to discuss any issues, questions, or comments.
- Email: donne.martin@gmail.com
- Twitter: @donne_martin
- GitHub: donnemartin
- LinkedIn: donnemartin
- Website: donnemartin.com
License
Copyright 2015 Donne Martin
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.