ITeye博客

flyingforce

flyingforce · 共 2 篇文章

LeetCode Multiply Strings

Given two numbers represented as strings, return multiplication of the numbers as a string. Note: The numbers can be arbitrarily large and are non-negative. 这道题可花了时间,还是对位置有点控制不好。 public class Solution { public String multiply(String num1, String num2) { String resultStr = new String; for (int i = 0…

2016-01-07T00:18:05Z · 评论(0)

LeetCode Add Two Numbers

:oops: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list. Input: (2 -> 4 -> 3) + (5 -> 6 -> 4) Output: 7 -> 0 -> 8 看了半天没搞清楚题目意思, :oops: 英语不够好…

2016-01-06T22:50:31Z · 评论(0)