Graph, Number Theory, String Hashing Algo added

This commit is contained in:
2023-11-12 19:31:52 +05:30
parent 1abfa41674
commit 6d69543289
10 changed files with 237 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
//Extended gcd -> Recursive
tuple<int,int,int> extended_gcd( int a, int b){
if( b == 0 ){
return {1,0,a};
}
int x,y,g;
tie(x,y,g) = extended_gcd( b , a%b );
return {y , x - (a/b)*y , g};
}