leetcode 43 Multiply Strings 1. class Solution { public: string multiply(string num1, string num2) { string str; int len1=num1.size(),len2=num2.size(); for(int i=len1-1;i>=0;--i) { int n1=num1[i]-'0'; if(!n1) continue; for(int j=len2-1;j>=0;--j) { int ...
https://leetcode.com/problems/multiply-strings/#/description Given two non-negative integersnum1andnum2represented as strings, return the product ofnum1andnum2. Note: The length of bothnum1andnum2is < 110. Bothnum1andnum2contains only digits0-9. Bothnum1andnum2does not contain any leading...
/*** Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(int x) { * val = x; * next = null; * } * }*/publicclassSolution {publicListNode addTwoNumbers(ListNode l1, ListNode l2) {if(l1 ==null&& l2 ==null)returnnull;if(l2 ==...