"An Object Oriented programming deals with data and members.
An Object Oriented Programming consumes more memory.
An OOPS Consist of bottom-up approach.
An OOPS is more secure Than POP.
POP.
An POP deals with Functions.
An POP is less secure compare to OOPS.
An POP contains less memory.
An POP doesnt contain acess Modifiers."
Arun G. - "An Object Oriented programming deals with data and members.
An Object Oriented Programming consumes more memory.
An OOPS Consist of bottom-up approach.
An OOPS is more secure Than POP.
POP.
An POP deals with Functions.
An POP is less secure compare to OOPS.
An POP contains less memory.
An POP doesnt contain acess Modifiers."See full answer
"from typing import List
def traprainwater(height: List[int]) -> int:
if not height:
return 0
l, r = 0, len(height) - 1
leftMax, rightMax = height[l], height[r]
res = 0
while l < r:
if leftMax < rightMax:
l += 1
leftMax = max(leftMax, height[l])
res += leftMax - height[l]
else:
r -= 1
rightMax = max(rightMax, height[r])
"
Anonymous Roadrunner - "from typing import List
def traprainwater(height: List[int]) -> int:
if not height:
return 0
l, r = 0, len(height) - 1
leftMax, rightMax = height[l], height[r]
res = 0
while l < r:
if leftMax < rightMax:
l += 1
leftMax = max(leftMax, height[l])
res += leftMax - height[l]
else:
r -= 1
rightMax = max(rightMax, height[r])
"See full answer