Question 24/500 - Problem Solving in JavaScript

Question 24: Create a function that will receive a string of braces, brackets and parentheses, and check whether their order is valid or not. The function should return true if their order is valid or false if its invalid.


We can easily solve it with regular expression. Here is the solution below using regex. Now what is Regular Expression or Regex in JavaScript ? You can learn from here.


Why should I follow this series and how will I benefit from it?

We are on a mission to solve 500 problems using JavaScript. We would start from very easy questions and gradually shift towards medium, hard and also very hard questions. 

By following this series you will also be able to learn DSA using JavaScript. Moreover, we will also solve questions from leetcode and other problem solving websites.

Please  follow and share this series on your story so that it can be beneficial for others as well.

Follow @devtipsdaily for more!

Post a Comment

Previous Post Next Post