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 ea167a9 commit 527a74cCopy full SHA for 527a74c
main.py
@@ -82,6 +82,17 @@ def compute(left, right):
82
ans += compute(op, ed)
83
return ans
84
85
+ def isSumEqual(self, firstWord: str, secondWord: str, targetWord: str) -> bool:
86
+
87
+ def compute(s):
88
+ temp = ""
89
+ base = ord('a')
90
+ for c in s:
91
+ temp += str(ord(c) - base)
92
+ return int(temp)
93
+ print(compute(firstWord), compute(secondWord), compute(targetWord))
94
+ return compute(firstWord) + compute(secondWord) == compute(targetWord)
95
96
s = Solution()
-print(s.minOperations( queries = [[2,6]]))
97
+print(s.isSumEqual(firstWord = "acb", secondWord = "cba", targetWord = "cdb"))
98
0 commit comments