Skip to content

Latest commit

 

History

History
executable file
·
27 lines (15 loc) · 652 Bytes

Numbers_In_Pi.md

File metadata and controls

executable file
·
27 lines (15 loc) · 652 Bytes

Numbers In Pi

Problem Statement

Given a string representation of the rst n digits of Pi and a list of your favorite numbers (all positive integers in string format), write a function that returns the smallest number of spaces that need to be added to the n digits of Pi such that all resulting numbers are found in the list of favorite numbers.

Sample input: "3141592653589793238462643383279", ["314159265358979323846","26433","8","3279","314159265","35897932384626433832","79"] <br> Sample output: 2 ("314159265 | 35897932384626433832 | 79")

Explanation

Solution

Check this Python code.