Apple onsite interview question.
Design a class which implements following functions:
func insertOrReplace(_ item: Int, at index: Int) func getMinIndex(of element: Int) -> Int