/Algorithms

Algorithm Design Course - Dr. Omid Sojoodi

Primary LanguageC++MIT LicenseMIT

Algorithm Design Course

  • Teacher : Dr. Omid Sojoodi
  • Student : Ramtin Kosari

Abstract

This Repository Contains Collection of Implementations and Usages of CLRS Book Algorithms Visualized by OpenCV C++ Library

Algorithms

Supported Algorithms :

  1. Sorts
    • Insertion Sort
    • Selection Sort
    • Bubble Sort
    • Quick Sort
    • Merge Sort
    • Heap Sort
  2. Search
    • Linear Search
    • Binary Search
  3. Min Max
    • Min Max of Array
  4. Large Numbers Operations
    • Multiplication of Large Numbers
    • Subtraction of Large Numbers
    • Addition of Large Numbers
    • Division of Large Numbers
  5. Matrix Operations
    • Strassen Matrix Multiplication
    • Matrix Chain Multiplication
    • Block Matrix Multiplication
    • Floyd Warshall Algorithm
    • Inverse of Matrix
  6. Travelling Salesman Problem
    • TSP Dynamic Programming
    • TSP Genetic Algorithm
    • TSP Branch and Bound
    • TSP Brute Force
  7. Knapsack Problem
    • Fractional Knapsack Problem
    • 0/1 Knapsack Problem
    • 0/1 Knapsack Branch and Bound Problem
  8. Moving on a Grid
    • Moving on a Grid
  9. Minimum Spanning Tree
    • Kruskal's Algorithm
    • Prim's Algorithm
  10. Shortest Path
  • Floyd Warshall Algorithm
  • Bellman Ford Algorithm
  • Dijkstra's Algorithm
  1. Huffman Coding
  • Huffman Coding
  1. N Queens Problem
  • N Queens Problem
  1. Convex Hull
  • Jarvis March
  • Graham Scan
  1. Graph
  • Breadth First Search
  • Depth First Search

Algoritms Images

Sorts

Sort by Theta

Here are Graphical Views of Sorting Algorithms on Random Generated Points, Final Result Shows Points that have been Sorted by Theta from Point in Middle

Sort Points Sort Final

Sorting 1 Sorting 2 Sorting 3

Sort by X-Axis (Left to Right)

Sort Final

Sorting 1 Sorting 2

N-Queens Algorithm

Here are Graphical Views of N-Queens Problem

N Queens Chess Board Finding Positions Final Positions

Another Position Showing Positions in Termnial Another Position

How to Run ?

First You Must Clone RKACPB Repository which is My Automatic C++ Project Builder by :

git clone https://github.com/RamtinKosari/RKACPB.git

Then, Go to RKACPB by cd RKACPB and Do this Command

./build.sh --packages "OpenCV;X11"

This will Automatically Build the Project, then You have to Go to the build Directory Created in Base Directory and Do this Command :

./run

Prerequisites

Before You Begin, Ensure You have Met the Following Requirements:

  • Installed OpenCV 4.x
  • Linux or MacOS
  • CMake and GCC Compiler