Skip to content

Commit 4b37165

Browse files
committed
misc
1 parent 40042cb commit 4b37165

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

my-submissions/e942 v3.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
class Solution:
2+
def diStringMatch(self, s: str) -> List[int]:
3+
return [(l := 0 if 'l' not in locals() else l + 1) if c == 'I' else (r := len(s) if 'r' not in locals() else r - 1) for c in s] + [l + 1 if 'l' in locals() else r - 1]

0 commit comments

Comments
 (0)