RodneyShag / HackerRank_solutions

317 efficient solutions to HackerRank problems
MIT License
2.69k stars 1.44k forks source link

why this input is false ? #24

Closed manjitsaha closed 4 years ago

manjitsaha commented 4 years ago

why this input is not balanced . is the code working incorrectly ? if code is working fine then please explain me why this input gives false.

({)} , {[(})] , [(]{)}

RodneyShag commented 4 years ago

That's not valid since the first 3 characters are ({). You cannot have "{" followed by a ")"