Arrays (Level-3)
Trapping rainwater
// C++ program to find maximum amount of water that can
// be trapped within given set of bars.
#include <bits/stdc++.h>
using namespace std;
int findWater(int arr[], int n)
{
// left[i] contains height of tallest bar to the
...
farazalam2017.hashnode.dev4 min read