Just a guy with a keyboard and some opinions
Hi, I'm David. Sometimes when I have an idea I mash my keyboard and then post the result. Here you can find keyboard mashings about my life, computers, and other stuff.
UVa 11995: I Can Guess the Data Structure! simplified problem statement: Given a sequence of push/pop operations, state whether the operations are valid for a queue, stack, priority queue, or some combination thereof (including none thereof).
UVa 11991: Easy Problem from Rujia Liu? simplified problem statement: You are given an array of integers and asked to answer a series of queries. Each query is of the form: “What is the index in the array of the ith occurance of the number j?”
UVa 11235: Frequent values simplified problem statement: You are given an array of integers and a number of queries. Each query is in the form of two positive integers i and j, and your program must print the number of occurances of the most frequently occuring value in the array between indicies i and j, inclusive.
The correct way to do UVa 10954: Add All is to use a priority queue.