A few problems

This commit is contained in:
2022-05-29 20:21:38 +01:00
parent 2c0204028e
commit 2a7ec7e34b
17 changed files with 228 additions and 1 deletions

View 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 {
}
}
}
}