/cplusplus

Basic C++ programs

Primary LanguageC++MIT LicenseMIT

cplusplus

Basic C++ programs

This repo contains following programs:

  1. Binary search: This program includes following functions -

    • Iterative implementation
    • Recursive implementation
    • Unit test functions of iterative and recursive implementation
  2. Factorial:

    • Iterative implementation
    • Recursive implementation
    • Unit test functions of iterative and recursive implementation
  3. Prime:

    • Prime number detection function
    • Finding first N prime numbers function
  4. Linear search:

    • Iterative implementation of linear search over an integer array.
    • Unit test function
  5. Fibonacci:

    • IsFibonacci function
    • FibonacciSeries function
    • NthFibonacci function
    • Individual unit test functions
  6. Quadratic: Implemented 2-dimensional quadratic equation solver function.

  7. GCD & LCM:

    • Finding GCD and LCM of n numbers (n >= 2)
    • Binary GCD algorithm implementation
  8. 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