3 ms·
I didn't do the math here but: Filtering out 5*... would remove 10% of the search space. (dots mean "followed by more stars") Filtering out *5*... would remove
by tomjakubowski 4y ago
I didn't do the math here but: Filtering out 5*... would remove 10% of the search space. (dots mean "followed by more stars")
Filtering out *5*... would remove 1%. So wouldn't ***555**** remove closer to 0.01%, not 0.1%?
- 8organicbits 4y agoTry the math, this is a good problem to work through. The position of the 5 doesn't impact the search space like that. 10% of the 10 digit numbers start with a 5. 10% of the 10 digit numbers end with a 5. 5... in your example shouldn't be 1%.