自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

原创 Valid Anagram

题目如下:Given two strings s and t, write a function to determine if t is an anagram of s. For example, s = “anagram”, t = “nagaram”, return true. s = “rat”, t = “car”, return false.思路如下:先判断

2015-08-11 10:25:26 252

原创 Search Insert Position

Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in order.You may assume no duplicates in the array.Here

2015-07-10 17:32:56 227

原创 Contains Duplicate

题目: Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every elemen

2015-07-10 15:09:37 345

原创 Excel Sheet Column Number

题目如下: Related to question Excel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example:A -> 1B -> 2C -> 3...Z -> 26AA -> 27AB -> 2

2015-06-15 20:34:39 265

原创 Single Number II

Given an array of integers, every element appears three times except for one. Find that single one.Note: Your algorithm should have a linear runtime complexity. Could you implement it without using ex

2015-06-15 18:38:18 332

原创 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 226

原创 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 324

原创 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 250

原创 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 363

原创 Two Sum leetcode第一题

Two SumGiven an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two numbers such that they add up to the target, w

2015-04-27 12:04:42 310

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除