Skip to main content

CurateClick

The Billion Pi Challenge

探讨如何在π的十亿位小数中高效查找特定数字序列的方法,采用空间换时间的策略建立滑动窗口索引来优化搜索速度。

Check out The Billion Pi Challenge on CurateClick

• Copy the embed code to showcase this product on your website

• Share on X to spread the word about this amazing tool

https://nullprogram.com/blog/2014/09/18/The Billion Pi Challenge:如何高效的在 pi 的十亿位小数中查找特定的数字序列?文中的假设:不要求完全精确(例如某个序列出现了一万次,可以只返回其中的一千次)文中的解法:- 空间换时间,用固定长度的滑动窗口建立索引(长度为n的序列 -> 出现位置的列表)- 为了优化速度,整个索引存储在内存中,且可以用不同的滑窗长度多次建立索引(3,6,8...);- 如果用户输入的序列长度和已有的索引长度不匹配,过短的填充(12345 -> 123450~123459),过长的先截取符合最长滑窗长度的前n位,缩小可能出现的位置数量,再回到原始的小数文件中逐个确认

Latest Weekly Picks

freeadhd.com favicon
Weekly Pick

ADHD Test - a free, no-sign-up adult ADHD self-screening tool with instant results.

ADHD Test
pixmira.ai favicon
Weekly Pick

Free AI photo editor and image generator for fast visual creation.

PixMira AI
pslratings.com favicon
Weekly Pick

Free PSL Rating gives an instant AI PSL score with tier and four category breakdowns, no signup.

Free PSL Rating
gothic1remake.com favicon
Weekly Pick

Gothic 1 Remake Guide — Release, Walkthroughs & Quests

gothic 1 remake

Predict video virality before you publish.

Virality Predictor

Powerful Motion Control AI Video Generator

Motion Control AI

PlusGO 是面向中国大陆用户的 ChatGPT Plus 代充值服务平台。使用官方 CDKey,支持支付宝和微信扫码支付,平均 2 分钟完成 Plus 开通,自 2025 年起已为超过 10,000 名用户完成充值。

www.toolcenter.ai favicon
Weekly Pick

Discover the Best AI & Productivity Tools — 1,500+ tools with honest reviews.

ToolCenter