...

/

Solved Problem - Balanced Parentheses Sequence

Solved Problem - Balanced Parentheses Sequence

In this lesson, we'll discuss a popular stack problem.

We'll cover the following...

Problem statement

Given a string sequence consisting of length NN only of opening or closing parentheses ( ) [ ] { }, determine if the sequence is a correct bracket sequence.

For example: If s1s1 and s2s2 are correct bracket sequences, so are the following:

  • (s1)s2(s1)s2
...
Access this course and 1400+ top-rated courses and projects.