---
title: "Mann Jain (@MJ16) | Hashnode"
description: "Engineer and Programmer. Read the latest articles by Mann Jain on Hashnode."
url: "https://hashnode.com/@MJ16"
---

@MJ16

# Mann Jain

@MJ16 · India · Joined January 2022

Engineer and Programmer

### [Fermat Theorem: Number Theory](https://techmadeeasy.hashnode.dev/fermat-theorem-number-theory?utm_source=hashnode&utm_medium=feed)

Any number which is a perfect square gives remainder either 0 or 1, when divided by 4. Even numbers would give 0 remainder and odd would give remainder as 1. Proof: Even number can be represented as : 2\*n. Square of even number = (2n)^2 = 4n...

3 min read · [techmadeeasy.hashnode.dev](https://techmadeeasy.hashnode.dev/fermat-theorem-number-theory?utm_source=hashnode&utm_medium=feed)

[Jun 17, 2024](https://hashnode.com/posts/fermat-theorem-number-theory/667025d95d81f0e1dbfc335b)

### [Robin Karp Algorithm](https://techmadeeasy.hashnode.dev/robin-karp-algorithm?utm_source=hashnode&utm_medium=feed)

txt -> length N (string s) pat -> length M (pattern) N>=M //To calculate hash from previous hash // hash( txt\[s+1 .. s+m\] ) = ( d ( hash( txt\[s .. s+m-1\]) – txt\[s\]\*h ) + txt\[s + m\] ) mod q // hash( txt\[s .. s+m-1\] ) : Hash value at sh...

2 min read · [techmadeeasy.hashnode.dev](https://techmadeeasy.hashnode.dev/robin-karp-algorithm?utm_source=hashnode&utm_medium=feed)

[Jul 13, 2022](https://hashnode.com/posts/robin-karp-algorithm/62ce461f1d29fac83b6d3a5c)

### [C++ Notes](https://techmadeeasy.hashnode.dev/c-notes?utm_source=hashnode&utm_medium=feed)

📌 Find Function //For Maps map<int,int>mp; mp.insert({2,3}); mp.insert({1,5}); if(mp.find(2) != mp.end()) cout<<mp.find(2)->second; //Output = 3 else cout<<"Not Found"; mp.find(3)->second //outputs 0, not present. //Time Complexi...

7 min read · [techmadeeasy.hashnode.dev](https://techmadeeasy.hashnode.dev/c-notes?utm_source=hashnode&utm_medium=feed)

[Jun 12, 2022](https://hashnode.com/posts/c-notes/62a57977165482d2b3eecf21)
