https://github.com/fredericheem/algorithm-interview-cpp
A collection of generic algorithms in C++
https://github.com/fredericheem/algorithm-interview-cpp
Last synced: 5 days ago
JSON representation
A collection of generic algorithms in C++
- Host: GitHub
- URL: https://github.com/fredericheem/algorithm-interview-cpp
- Owner: FredericHeem
- Created: 2016-12-15T21:44:47.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-02T13:26:13.000Z (almost 9 years ago)
- Last Synced: 2025-02-28T20:41:42.113Z (over 1 year ago)
- Language: C++
- Homepage:
- Size: 49.8 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
A collection of *generic* algorithms in C++ 11, based on the STL library, useful for preparing job interviews...
## Sorting
* Quick Sort
* Bubble Sort
* Insertion Sort
* Selection Sort
* Heap Sort
## Data structures
* Linked List
* Binary Tree
* Array
### Linked List
* creation
* push back element
* size
* clear
* reverse
* delete by value
### Binary Tree
* create
* insert node
* remove node
* clear all nodes
* Breadth first search
* Depth first search
### Array
* intersection
## Graph
* Dijkstra - shortest path
## Algorithm
* Binary Search - non recursive
* Binary Search - recursive
## How to build and run
Build and Run:
$ mkdir build && cd build
$ cmake ..
$ make
$ ctest
## STL
This library uses the following STL algorithms, functions and data structures:
* std::unordered_set
* std::unordered_map
* std::priority_queue
* std::vector
* std::list
* std::next
* std::distance
* std::swap
* std::min_element
* std::sort
* std::is_sorted