- Integer add without arithmetic operators: C++
- Bitfield manipulation functions (test, set, clear): C++
- The Labyrinth (connected component size with DFS): C++
- Dijkstra's single-source shortest-paths algorithm: Python
- Breadth-first search on a graph: Python
- Depth-first search on a graph: Python
- Binary search on an array: Python
- Implementation of a queue using two stacks: Python
- Simple queue implementation: Python
- Simple stack implementation: Python
- Linked list removal of node in middle of list: Python
- Linked list duplicate node removal: Python
- Linked list node implementation: Python
- URL encode whitespace of string in-place: C++
- C-string reverse: C++
- String permutation check: Python
- String rotation check: Python, C++
- Simple string compress: Python, C++
- String replace: Python
- Codeforces Problem 1A ("Theatre Square"): C++
- Data type size listing: C++
- String concatenation benchmark: C++
- FizzBuzz: C++
- Standing ovation: Python
- Vietnam snake: Python
Python unit tests kept alongside target files in subdirectories, so to run all unit tests within a category:
cd target_directory
python -m unittest discover --pattern=test*.py
I use the Google Python style guide to format my Python code, and pylint as a quick tool to check adherence to the formatting style.
Install pylint on Debian/Ubuntu and run it on Python source:
sudo apt-get install pylint
pylint source.py