This repo is a collection of super useful code snippets in C++ (some are in Java, also) for optimized and time-saving implementation of algorithms and tricks used in competitive coding, and propbably extend it for storing repetitive code for other projects.
😄
Have fun using them and please pull a request for new cool additions, which you might know. Thank you! Here's some 🍫 for you. Sharing is great!
###Table of Contents
Almost all of the code is in C++
. Few algorithms and problems requiring BigInteger
, java.util.Calendar
,java.time
and some string based problems are obviously implemented in Java 7/8
.
Without further ado, here's the list.
- Mathematics
- Number Theory
- Modular Exponentiation
- Fermat Primality Test
- Miller-Rabin Primality Test
- Deterministic O(sqrt(n)) approach
- Seive of Eratosthenes
- GCD and LCM
- Euler Phi Function
- Number Theory