NJACKWinterOfCode / nwoc_algorithms

This is a library of various algorithms that are used in competitive programming.
6 stars 52 forks source link

nwoc_algorithms

This is a library of various algorithms that are used in competitive programming.

Combination Computation

combination_by_eluer_method.cppis a algorithm to compute the combinations of large numbers. Since in competitive programming we often deal with large numbers so computing combination becomes difficult therefore Eluer method provide an easy and fast way to compute nCr%1000000007 of big numbers.

Detecting cycles in Graph

cycle_in_directed_graph.cpp and cycle_in_undirected_graph.cpp are two algorithms which detect cycles in a graph by DFS algorithm.

sample algorithm

disjoint_set_union.cpp

Backtracking Algorithms

Hamiltonian Cycle
M Coloring Problem
N Queen Problem
Rat in a Maze
Sudoku

Bellman Ford Algorithm

Bellman Ford Algorithm

Circular Queue

Circular Queue

Graphs

Breadth First Search
Depth First Search
Detect Cycle in Undirected Graph
Dijkstra
Kruskal

Greedy Algorithm

Egyptian Fraction

Kadane Algorithm

Kadane Algorithm

Last Men Standing

Last Men Standing

Prims Algorithm

Prims Algorithm

Sample algorithm

disjoint set union
Floyd cycle detection

Searching Algorithms

Binary Search
Jump Search
Linear Search

Graph Algorithm

breadth first search
Depth first Search

Sorting algorithm

Bubble Sort
Heap Sort
Insertion Sort
Selection Sort
Shell Sort Merge Sort
Radix Sort
Selection Sort

Stacks

Implementation
Infix to Postfix
Postfix

Strings

Substitution Cipher

String Hashing

Count Substring
Rabin Karp Algorithm
Manacher Algorithm
Z Algorithm

Tower Of Hanoi

Tower of Hanoi