We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40042cb commit 4b37165Copy full SHA for 4b37165
my-submissions/e942 v3.py
@@ -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