- 博客(4)
- 收藏
- 关注
原创 3Sum
使用3层for循环暴力之public class Solution { public static List<List<Integer>> threeSum(int[] nums) { List<List<Integer>> countList = new ArrayList<List<Integer>>(); List<Integer> list = nul
2015-05-21 21:59:08 230
原创 leetcode Single Number 136
题目如下: Given an array of integers, every element appears twice except for one. Find that single one.(给一个整型数组,数组中的元素,除了一个是单独出现的,其他全部出现两次,请找出只出现一个次的元素)public class Solution { public static int singl
2015-05-13 11:43:20 332
原创 Majority Element leetcode[169]
题目如下: Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.You may assume that the array is non-empty and the majority element
2015-05-04 20:26:05 256
原创 Length of Last Word (leetCode 58)
题目如下: Given a string s consists of upper/lower-case alphabets and empty space characters ’ ‘, return the length of last word in the string.If the last word does not exist, return 0.Note: A word is def
2015-05-04 17:42:33 369
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人