Open Mrinalini99 opened 4 years ago
I added a Cpp program to check if stack elements are pairwise consecutive.
For Example :- Input : stack = [4, 5, -2, -3, 11, 10, 5, 6, 20] Output : Yes Explanation - Each of the pairs (4, 5), (-2, -3), (11, 10) and (5, 6) consists of consecutive numbers
I added a Cpp program to check if stack elements are pairwise consecutive.
For Example :- Input : stack = [4, 5, -2, -3, 11, 10, 5, 6, 20] Output : Yes Explanation - Each of the pairs (4, 5), (-2, -3), (11, 10) and (5, 6) consists of consecutive numbers