Flipkart Interview Question

Binary Search,simple dp and simple greedy