Microsoft Interview Question

Solve 3Sum and containers rain water question