CodingTrain / Suggestion-Box

A repo to track ideas for topics
572 stars 86 forks source link

PI Day: Find sequence in PI #1464

Open la-bibe opened 4 years ago

la-bibe commented 4 years ago

An idea of a coding challenge for PI Day (my first contribution yey :smiley:):

Search for a given sequence of number in the digits of PI like the birth date of the user or its phone number. It is not required to compute a big number of digits of PI, it can instead be loaded from an online file.

It would be a nice occasion to cover a string search algorithm like the Boyer-Moore algorithm which is very interesting to show to beginners to learn how a simple search can be optimized using a bit of logic (and learn why the search is faster with a longer sequence to search for !).

Here is an example website doing this sequence localisation in PI digits: https://www.angio.net/pi/

shiffman commented 4 years ago

I think I am going to do this today! There is also http://pi.fathom.info/