← All tags

#Stack

2 uses
Posts
Post Mrinal

Another LeetCode problem solved and accepted! ✅

Today I worked on the Valid Parentheses problem, a classic problem that tests stack-based problem-solving and logical thinking. The goal is simple: determine whether a string containing (), {}, and [] is valid. A string is valid when every opening bracket has the correct closing bracket, and the brackets are properly nested. I solved this using a Stack in JavaScript. Whenever an opening bracket a…

8
Post Mrinal

Today I solved LeetCode #20 – Valid Parentheses using JavaScript and successfully passed all 103 test cases! 🎯

The problem looks simple at first, but it is a great example of how choosing the right data structure can make a solution both clean and efficient. The goal is to determine whether a string containing (), {}, and [] is valid. Every opening bracket must have the correct closing bracket, and brackets must close in the proper order. I solved it using a Stack. The approach is straightforward: Create …

7