Retired
Valid Parentheses (retired)
38,485 of 97,895xDranik
Description:
Write a function that takes a string of parentheses, and determines if the order of the parentheses is valid. The function should return true
if the string is valid, and false
if it's invalid.
Examples
"()" => true
")(()))" => false
"(" => false
"(())((()())())" => true
Constraints
0 <= input.length <= 100
Algorithms
Similar Kata:
Stats:
Created | Nov 4, 2013 |
Warriors Trained | 158012 |
Total Skips | 20047 |
Total Code Submissions | 585379 |
Total Times Completed | 97895 |
JavaScript Completions | 38485 |
CoffeeScript Completions | 229 |
Haskell Completions | 1427 |
Python Completions | 38741 |
Ruby Completions | 3529 |
Dart Completions | 578 |
Go Completions | 1898 |
Elixir Completions | 260 |
C# Completions | 6409 |
Objective-C Completions | 29 |
NASM Completions | 64 |
C Completions | 2139 |
Java Completions | 5571 |
COBOL Completions | 5 |
Julia Completions | 30 |
Rust Completions | 486 |
D Completions | 6 |
Total Stars | 2400 |
% of votes with a positive feedback rating | 91% of 8338 |
Total "Very Satisfied" Votes | 7045 |
Total "Somewhat Satisfied" Votes | 1128 |
Total "Not Satisfied" Votes | 165 |