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

CurateClick favicon

kaigpt.ai

gpt代充:如何快速申请免手续费的充值服务?

CurateClick favicon

magiclayers.net

Magic Layers – Official Website, What It Is & How to Use

CurateClick favicon

lifepathcalculator.app

Life Path Calculator - free deterministic numerology: your number, strengths, challenges, and shareable cards.

CurateClick favicon

freeadhd.com

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

CurateClick favicon

pixmira.ai

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

CurateClick favicon

pslratings.com

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

CurateClick favicon

gothic1remake.com

Gothic 1 Remake Guide — Release, Walkthroughs & Quests

CurateClick favicon

viralitypredictor.net

Predict video virality before you publish.