Data Structure Libraries and Algorithms implementation in C++
Disclaimer
This repository is meant to be used as a reference to learn data structure and
algorithm.
- Dynamic Connectivity
- Sorting Algorithms
- Stack (Array Implementation)
- Queue (Array Implementation)
- LinkedList
- Suffle
- Binary Search Tree
- Binary Heap
- Binary Search
- Red Black Tree
- Bitwise
- Find the element that appears once in an array where every other element appears twice
- Count number of common elements between two arrays
- Find the two non-repeating elements in an array of repeating elements
- Print all subsequences of a string
- Subset sum queries using bitset
- Unique element in an array where all elements occur k times except one
- Maths
- Count Divisors of Factorial
- Find all divisors of a natural number
- Extended Euclidean Algorithm
- GCD(HCF) of two numbers (Euclidean Algorithm)
- Least Prime Factor of numbers till n
- Legendre’s formula (Given p and n, find the largest x such that p^x divides n!)
- Modular Exponentiation (Power in Modular Arithmetic)
- Modular Multiplicative Inverse
- Total number of divisors for a given number
- Prime Factorization using Sieve O(log n) for multiple queries
- Print all prime factors of a given number
- Segmented Sieve (Print Primes in a Range)
- Sieve of Eratosthenes
- Sum of all proper divisors of a natural number
Feel Free to contribute.
Please follow standard C++ Guidelines.