ben.matrixNewbiePosts: 1362 · Reputation: 35#21May 3, 2021, 10:29 PMNo algorithm gives O(1) lookup for non-linear keys. A B-Tree can help speed things up, but you’ll still have log(n) performance. 3 Reply Quote Share
ben.matrixNewbiePosts: 1362 · Reputation: 35#22May 6, 2021, 10:13 AMLet’s say I have 60GB RAM and computed 2^30 points will lookups be O(1)? I have an algorithm that solves some puzzles faster, but I need instant lookups. 4 Reply Quote Share
ben.matrixNewbiePosts: 1362 · Reputation: 35#23May 6, 2021, 09:04 PMNope, it won't be instant. You need a dictionary structure for lookups. With 2^30 keys, direct O(1) access needs way more space than you have. 3 Reply Quote Share