sudoankit / Codebook

:notebook: Codebook : code snippets for every :sparkles: algorithm for fast AC's!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Codebook 0️⃣1️⃣0️⃣1️⃣1️⃣0️⃣

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

About

:notebook: Codebook : code snippets for every :sparkles: algorithm for fast AC's!

License:MIT License


Languages

Language:C++ 100.0%