Basic C++ programs
This repo contains following programs:
-
Binary search: This program includes following functions -
- Iterative implementation
- Recursive implementation
- Unit test functions of iterative and recursive implementation
-
Factorial:
- Iterative implementation
- Recursive implementation
- Unit test functions of iterative and recursive implementation
-
Prime:
- Prime number detection function
- Finding first N prime numbers function
-
Linear search:
- Iterative implementation of linear search over an integer array.
- Unit test function
-
Fibonacci:
- IsFibonacci function
- FibonacciSeries function
- NthFibonacci function
- Individual unit test functions
-
Quadratic: Implemented 2-dimensional quadratic equation solver function.
-
GCD & LCM:
- Finding GCD and LCM of n numbers (n >= 2)
- Binary GCD algorithm implementation
-
List: Implemented basic list operations to handle sinlgy linked list of generic data. Following functions are implemented:
- Default constructor
- Copy constructor
- Assignment operator
- Destructor
- operator ==
- operator !=
- operator []
- length
- empty
- push_back
- push_front
- pop_back
- pop_front
- peek_back
- peek_front
- reverse
- clear
- equals
- resize
- at