You are viewing a single comment's thread. Return to all comments →
Hey it's mentioned in the problem, if you do not find any element to its left or right. It should be considered as zero.
In this case for
left = 0
right = 0
both are same, print Yes