Posts

Showing posts from July 18, 2020

Data Structure Interview question - Write an algorithm to check for balanced parentheses in a String

Image
A while back I had a difficult interview. It was during COVID-19, so granted it was via a Zoom call which I had to take from a remote room that had no air conditioning. It was my first software engineering related interview,  so I got so nervous, sweating and shocked, that I didn't manage to answer the question like I hoped to. Anyone who knows me personally, knows that I never had any official programming training, and everything I know I picked up on the job, studied by myself or just spent hours cracking in front of various resources found online. Learning is a huge passion for me, It makes me feel "Armed", and it is my biggest motivation. But excuses aside, I did't do well, and it bothered me, so I decided to spend the next weekend understanding the task deeper.  In this post, we are going to cover a common data structure algorithm question. "Write an algorithm that checks for balanced parentheses in a given String". How do we "Attack" this que