Optiver interview question

Basic Java and Leetcode Medium/Hard questions