Given an array of non-negative integers representing elevation, calculate the total trapped rainwater. Additionally, identify the index where the maximum amount of water is trapped.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.