We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9af563d commit 33e4421Copy full SHA for 33e4421
Add_Strings/EfficientSolution.py
@@ -0,0 +1,20 @@
1
+##==================================
2
+## Leetcode
3
+## Student: Vandit Jyotindra Gajjar
4
+## Year: 2020
5
+## Problem: 415
6
+## Problem Name: Add Strings
7
+##===================================
8
+#
9
+#Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2.
10
11
+#Note:
12
13
+#The length of both num1 and num2 is < 5100.
14
+#Both num1 and num2 contains only digits 0-9.
15
+#Both num1 and num2 does not contain any leading zero.
16
+#You must not use any built-in BigInteger library or convert the inputs to integer directly.
17
+class Solution:
18
+ def addStrings(self, num1, num2):
19
+ tmp = int(num1) + int(num2) #Initialize tmp and convert the numbers to int
20
+ return str(tmp) #We return str of tmp
0 commit comments