Problem 1: Smallest Number in Infinite Set
https://leetcode.com/problems/smallest-number-in-infinite-set/description/
Problem Statement:
You have a set which contains all positive integers [1, 2, 3, 4, 5, ...].
Implement the SmallestInfiniteSet class:
SmallestInfiniteSet() - Initializes the SmallestInfiniteSet object to contain all positive integers
int popSmallest() - Removes and returns the smallest integer contained in the infinite set
void addBack(int num) - Adds a positive integer num back into the infinite set, if it is not already in the infinite setProblem 2 : Similar to : https://codeforces.com/problemset/problem/780/B
The main road in Bytecity is a straight line from south to north. There are coordinates measured in meters from the southernmost building in the north direction.
At some points on the road, there are n friends. The i-th friend is standing at point xi meters and can move with any speed no greater than vi meters per second in either direction along the road (south or north).
Compute the minimum time needed to gather all n friends at some point on the road. Note that the meeting point doesn't need to have an integer coordinate.