Oracle Interview Question

Train time overlapping and Trapping rain water along with some core java