Skip to content

Comment on The Dollar Redesign Projectparent

Comments

I only meant for inserting one bill, so N is the number of bills you have already. Using a binary search on a sorted list, either to find a specific denomination you want or to find the correct spot for a new bill, is O(log(N)).

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.