trapping the rain water

 class Solution {

public:
    int trap(vector<int>& height) {
        vector<int>a;
        vector<int>b;
       min[height[i-1],height[i+1]];
        for(int i=0;i<height.size()-1;i++){
            if(height[i]<height[i+1] && height[i]<height[i-1]){
                min[height[i-1],height[i+1]];;
            }
        }
    }
};

Comments

Popular posts from this blog

day1(4july)

day2(5july)