File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments