Eze Software Group Interview Question
Senior Software Development EngineersCountry: United States
Interview Type: In-Person
This is a very simple question . If you want answer to this question , there are tons of places you would find solution for this. If you want to share the question for the purpose of letting everyone know it was asked in your interview, you can share which company etc.
Anyways : a brief algo insight,
you scan string from left to right, and encountering any opening bracket, you push this char into a stack. If you see any closing bracket, you pop top element and it should match the opening bracket. If it doesn't, your string is not matched otherwise continue.
In the end, if stack is empty all brackets has been matched else, your string is not matched.
I sincerely suggest the poster of this question to do a brief google before posting such questions.
- koustav.adorable August 13, 2017This is pretty standard interview question.