Tag Archives: empty

Data structure challenge: application

I forgot to mention this in my previous post, but the thing which got me thinking about the predecessor problem in the first place was this competitive programming problem on Open Kattis: Profitable Pizzas I challenge you to go and … Continue reading

Posted in data structures | Tagged , , , , , , , , , , , , , , | Leave a comment

Data structure challenge: solutions

In my previous post I challenged you to find a way to keep track of a sequence of slots in such a way that we can quickly (in or better) either mark any empty slot as full, or find the … Continue reading

Posted in data structures | Tagged , , , , , , , , , , , , | 3 Comments

Data structure challenge: finding the rightmost empty slot

Suppose we have a sequence of slots indexed from 1 to . Each slot can be either empty or full, and all start out empty. We want to repeatedly do the following operation: Given an index , find the rightmost … Continue reading

Posted in data structures | Tagged , , , , , , , | 16 Comments