Skip to content

Collection of algorithms and data structures implemented in C++

License

Notifications You must be signed in to change notification settings

sangingeum/Algorithm-and-DataStructure

Repository files navigation

C++ Algorithms and Data Structures

Description

This repository contains C++ implementations of various algorithms and data structures.

Implementation

Data Structure

  • Hash Table
  • Binary Heap
  • Fibonacci Heap
  • Binary Search Tree
  • Red Black Tree
  • K-D Tree
  • Segment Tree
  • Graph
    • Adjacency List
    • Adjacency Matrix
  • Disjoint Set

Sorting Algorithm

  • Quick Sort
  • Heap Sort
  • Counting Sort
  • Radix Sort
  • Bucket Sort
  • Topological Sort

Graph Algorithm

  • Kruskal's Algorithm
  • Prim's Algorithm
  • Floyd-Warshall Algorithm
  • Bellman-Ford Algorithm
  • Shortest Path in a Directed Acyclic Graph(DAG)
  • Dijkstra's Algorirhm
  • A* Algorithm (UCS<---Weighted A*--->Greedy BeFS depending on the heuristic function)

Dynamic Programming

  • 0/1 Knapsack Problem
  • Longest Increasing Subsequence(LIS)
  • Longest Common Subsequence(LCS)
  • Rod Cutting
  • Coin Change
  • Levenshtein Distance

Greedy Algorithm

  • Interval Scheduling

Selection Algorithm

  • Quick Select

Convex Hull Algorithm

  • Graham Scan

String Searching Algorithm

  • Knuth-Morris-Pratt Algorithm

Code Examples

For each algorithm and data structure, you can find corresponding C++ code example in their respective folder.