You are tasked with implementing a class that helps track the kth highest score in a dynamic list of test scores. Each time a new score is submitted, you need to return the kth highest score in the list.
Design a system that processes daily stock price quotes and computes the price span for the current day. The price span for a day is defined as the maximum number of consecutive days (including today) where the price of the stock was less than or equal to today’s price.
You are tasked with simulating the history of web page visits in a browser. Implement the BrowserHistory class to manage visit, back, and forward actions.
You are given a stream of n (id, value) pairs, where id is an integer between 1 and n, and value is a string. The task is to design a stream that returns the values in increasing order of their id. After each insertion, the stream should return the largest possible chunk of values that appear next in the order.
Design a queue that supports operations at the front, middle, and back. Implement the FrontMiddleBackQueue class with methods for adding and removing elements from these positions.