Adds solution for LeetCode Daily Challenge on (27.10.24) in (JS).
I have used stack and object. This problem is to identify the order of opened and closed parenthesis. The object is used to store the pattern of open & close parenthesis, stack is used to track the open parenthesis and pops the parenthesis at top when a closed parenthesis is found on traversing the input within loop. Hence, we get a valid or invalid parenthesis.
📝 Issue Reference:
Fixes issue: #25
🔍 Checklist:
Please ensure the following before submitting your PR:
[x] I have placed my solution in the correct folder (solutions/day25/).
[x] My code follows clean coding practices and is efficient.
[X] I have tested the solution on LeetCode and it works correctly.
🔧 Solution Details:
Language Used: (e.g., Python, Java, C++, etc.)
Time Complexity: (e.g., O(n log n), O(n), etc.)
Space Complexity: (e.g., O(1), O(n), etc.)
🌟 Additional Notes (if any):
Since every valid sequence should have an even length, therefore I check the length of input for even value at the start of the function.
🚀 What does this PR do?
📝 Issue Reference:
Fixes issue: #25
🔍 Checklist:
Please ensure the following before submitting your PR:
solutions/day25/
).🔧 Solution Details:
🌟 Additional Notes (if any):
Since every valid sequence should have an even length, therefore I check the length of input for even value at the start of the function.