My practice on leetcode including 208 of 405 problems.
All codes tested on platform Windows 7/10 (VS2010) and Ubuntu 14.04 (GCC) using Catch.
Structure:
+ root
|
+--+ catch/ // main() and header for Catch Test
|
+--+ include/ // declarations and helper functions
|
+--+ project/
| |
| +--+ VS2010/ // project for VS2010 on Windows platform
| |
| +--+ g++/ // makefile for GCC
|
/--+ src/ // algorithm and test of problems on leetcode
gcc usage: cd ./project/g++
, make
, ./MyLeetCode
.
Problems are assorted into 15 groups:
(Links lead to my notes on each topic in Simplified Chinese. You can also find the classification in the VS2010 solution.)
- Bit Manipulation
- Arrays
- Strings
- Linked Lists
- Stacks and Queues
- Tree
- Graph
- Brute Force
- Searching
- Sorting
- Devide and Conquer
- Dynamic Programming
- Greedy Technique
- Backtracing & Branch-and-Bound
- Detail
The index of my notes on algorithm and data structure in my blog.
Reference:
[1] https://leetcode.com/
[2] https://github.com/soulmachine/leetcode
[3] Introduction to the Design and Analysis of Algorithms