Algorithms Fantasy Template Library for C++

For learning, demonstration and for fun!

Algorithms:

Sorting:

  • randomized Quick-Sort + Insertion optimization + half stack overhead + two way partition;
  • Merge-Sort
  • Selection-Sort
  • Two-way-Selection-Sort with 3*n/2 comparisons;
  • Bubble-Sort
  • Insertion-Sort

Searching:

  • Recursive Binary Search
  • Iterative Binary Search
  • Minimum Search
  • Maximum Search
  • Simultaneously Min and Max Search

Data Structures:

  • Binary Search Tree
  • double LinkedList addAfter, addBefore, addFirst, addLast, find, findLast, clear, contain, remove
  • Staque: Queue made by 2 Stacks
  • Stack: rotated Stack
  • Queue: by 2 Stacks
  • Vector/ ArrayList

APIs:

Vector

Vector<Type>::begin Vector<Type>::end Vector<Type>::front Vector<Type>::back
Vector<Type>::at Vector<Type>::pop_back Vector<Type>::push_back 
Vector<Type>::clear Vector<Type>::empty Vector<Type>::erase Vector<Type>::expand 
Vector<Type>::getBuffer Vector<Type>::getCapacity Vector<Type>::getSize 
Vector<Type>::setBuffer Vector<Type>::setCapacity Vector<Type>::setSize 
Vector<Type>::Vector Vector<Type>::Vector Vector<Type>::Vector

Most important:

Have fun!