摘要: import java.util.ArrayList; public class Solution { public int[] multiply(int[] A) { if(A==null || A.length == 0){ return null; } int[] B = n... 阅读全文
posted @ 2019-05-28 15:46 紫色的雪 阅读(947) 评论(0) 推荐(0)
摘要: import java.util.*; public class Solution { // Parameters: // numbers: an array of integers // length: the length of array numbers // duplication: (Output) the dupli... 阅读全文
posted @ 2019-05-28 14:35 紫色的雪 阅读(367) 评论(0) 推荐(0)
摘要: public class Solution { public int StrToInt(String str) { if(str == null || str.length()==0){ return 0; } int flag = 1; int start = 0;//用于标志符号位 ... 阅读全文
posted @ 2019-05-28 09:49 紫色的雪 阅读(783) 评论(0) 推荐(0)
摘要: public class Solution { public int Add(int num1,int num2) { int sum = 0;//不带进位的结果 int carry = 0;//进位 while(num2 != 0){ sum = num1 ^ num2; carry = (num... 阅读全文
posted @ 2019-05-28 09:13 紫色的雪 阅读(1293) 评论(0) 推荐(0)