摘要: 1 package Today; 2 3 import java.util.HashMap; 4 import java.util.Map; 5 6 //LeetCode:167. Two Sum II - Input array is sorted 7 /* 8 Given an array of integers that is already sorted in as... 阅读全文
posted @ 2017-02-06 11:23 蒲公英的花朵 阅读(191) 评论(0) 推荐(0)
摘要: 1 package Today; 2 //LeetCode:492. Construct the Rectangle 3 /* 4 For a web developer, it is very important to know how to design a web page's size. 5 So, given a specific rectangular web pag... 阅读全文
posted @ 2017-02-06 11:23 蒲公英的花朵 阅读(408) 评论(0) 推荐(0)
摘要: 1 package Today; 2 //LeetCode:453. Minimum Moves to Equal Array Elements 3 /* 4 Given a non-empty integer array of size n, find the minimum number of moves required to make all array 5 elements... 阅读全文
posted @ 2017-02-06 11:22 蒲公英的花朵 阅读(124) 评论(0) 推荐(0)
摘要: 1 package Today; 2 //LeetCode:35. Search Insert Position 3 /* 4 Given a sorted array and a target value, return the index if the target is found. 5 If not, return the index where it would be ... 阅读全文
posted @ 2017-02-06 11:21 蒲公英的花朵 阅读(133) 评论(0) 推荐(0)
摘要: package Today;//LeetCode:459. Repeated Substring Pattern/* Given a non-empty string check if it can be constructed by taking a substring of it and app 阅读全文
posted @ 2017-02-06 11:20 蒲公英的花朵 阅读(229) 评论(0) 推荐(0)
摘要: package HashTable;////Question 447. Number of Boomerangs/*Given n points in the plane that are all pairwise distinct, a "boomerang" is a tuple of poin 阅读全文
posted @ 2017-02-03 17:07 蒲公英的花朵 阅读(257) 评论(0) 推荐(0)
摘要: package Math; import java.util.Arrays; //Question 268. Missing Number/* Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find 阅读全文
posted @ 2017-02-03 17:06 蒲公英的花朵 阅读(104) 评论(0) 推荐(0)
摘要: package String; import java.util.regex.Matcher;import java.util.regex.Pattern; //Question 434. Number of Segments in a String/*Count the number of seg 阅读全文
posted @ 2017-02-03 17:05 蒲公英的花朵 阅读(390) 评论(0) 推荐(0)
摘要: 1 package Others; 2 3 import java.util.Arrays; 4 5 6 //Question 455. Assign Cookies 7 /* 8 Assume you are an awesome parent and want to give your children some cookies. 9 But, you should... 阅读全文
posted @ 2017-01-06 14:27 蒲公英的花朵 阅读(146) 评论(0) 推荐(0)
摘要: 1 package BitManipulation; 2 3 import java.util.ArrayList; 4 import java.util.List; 5 6 //Question 448. Find All Numbers Disappeared in an Array 7 /* 8 Given an array of integers where 1 ≤ ... 阅读全文
posted @ 2017-01-06 12:34 蒲公英的花朵 阅读(270) 评论(0) 推荐(0)