Amazon interview question

Kth smallest in a array Best Time to Buy and Sell Stock II Longest consecutive subsequence ACID properties