Below is the nice examples provided by geeksforgeeks.
1. Modular Exponentiation
2. Modular multiplicative inverse
3. Primality Test | Set 2 (Fermat Method)
4. Euler’s Totient Function
5. Sieve of Eratosthenes
6. Convex Hull
7. Basic and Extended Euclidean algorithms
8. Segmented Sieve
9. Chinese remainder theorem
10. Lucas Theorem
Before programming – build logic and check logic with programs and then do the actual programming.
Helps in programming when these kinds of programs has been asked