A few problems
This commit is contained in:
19
longest-valid-parentheses/sol.rs
Normal file
19
longest-valid-parentheses/sol.rs
Normal file
@@ -0,0 +1,19 @@
|
||||
// Incomplete
|
||||
impl Solution {
|
||||
pub fn longest_valid_parentheses(s: String) -> i32 {
|
||||
if s.len() == 0 { 0 }
|
||||
let mut s = 0;
|
||||
let mut open = 0;
|
||||
let mut acc = 0;
|
||||
for c in s.chars().into_iter() {
|
||||
if c == '(' {
|
||||
open += 1;
|
||||
} else {
|
||||
open -= 1;
|
||||
}
|
||||
if open == 0 {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user