HarshCasper / NeoAlgo

Bringing all Data Structures and Algorithms under one Roof ⚡
MIT License
875 stars 1.05k forks source link

Garner's Algorithm in Java #1777

Closed Khimit closed 3 years ago

Khimit commented 3 years ago

@SKAUL05 @hushee69 @iamrajiv

Garner's Algorithm in Java

Let p be the product of the first 1000 primes. From calculations we can see that p has around 3000 digits.

Any number a less than p can be represented as an array a1,…,ak, where ai = a (mod pi). But to do this we obviously need to know how to get back the number a from its representation.

Garner's Algorithm can be used for this purpose. We seek a representation on the form a=x1 + x2p1 + x3p1p2 +…+ xkp1…pk−1

I want to implement this algorithm in Java.

Khimit commented 3 years ago

@iamrajiv @SKAUL05 @hushee69 @mechiragjain I would like to work on this. please assign this task to me.. thank you..

And please also add DWoC label to this...

shraddhavp commented 3 years ago

@Khimit assigned