1class Solution {2 public int[] maxDepthAfterSplit(String seq) {3 int[] res = new int[seq.length()];4 for (int i = 0; i < seq.length(); i++) {5 res[i] = seq.charAt(i) == '(' ? i & 1 : 1 - i & 1;6 }7 return res;8 }9}
WPM •0 •0
ACC •0 •0
TIME •0