CODE 100: Search in Rotated Sorted Array

Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). You are given a ...

2013-10-31 22:25:17

阅读数:395

评论数:0

CODE 99: Search for a Range

Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm's runtime complexity must be in th...

2013-10-31 21:57:07

阅读数:371

评论数:0

CODE 98: 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 o...

2013-10-30 22:59:11

阅读数:339

评论数:0

CODE 97: Valid Sudoku

Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules. The Sudoku board could be partially filled, where empty cells are filled...

2013-10-30 22:32:20

阅读数:531

评论数:0

CODE 96: Sudoku Solver

Write a program to solve a Sudoku puzzle by filling the empty cells. Empty cells are indicated by the character '.'. You may assume that there ...

2013-10-29 22:05:06

阅读数:320

评论数:0

CODE 95: Count and Say

The count-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 1...

2013-10-29 20:47:45

阅读数:441

评论数:0

CODE 93: Combination Sum II

Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Ea...

2013-10-28 21:30:20

阅读数:425

评论数:0

CODE 94: Combination Sum

Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. The same ...

2013-10-28 21:11:00

阅读数:373

评论数:0

CODE 92: First Missing Positive

Given an unsorted integer array, find the first missing positive integer. For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2. Your ...

2013-10-28 19:25:31

阅读数:461

评论数:0

CODE 91: Trapping Rain Water

Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining...

2013-10-27 22:20:33

阅读数:439

评论数:0

CODE 90: 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...

2013-10-27 19:38:08

阅读数:398

评论数:0

无题

点击打开链接 ------------------------------------------------------------------------------------  后面是9月份以前默默的自己瞎写的内容,那时候还不知道找工作会遇到什么,哎呀,不舍得删  ---...

2013-10-27 16:15:38

阅读数:552

评论数:0

CODE 89: Wildcard Matching

Implement wildcard pattern matching with support for '?' and '*'. '?' Matches any single character. '*' Matches any sequence of characters (includin...

2013-10-27 11:03:54

阅读数:489

评论数:0

CODE 88: Jump Game II

Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your m...

2013-10-20 21:46:52

阅读数:479

评论数:0

CODE 86: Permutations II

Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example, [1,1,2] have the following uni...

2013-10-20 15:43:32

阅读数:429

评论数:0

CODE 87: Permutations

Given a collection of numbers, return all possible permutations. For example, [1,2,3] have the following permutations: [1,2,3], [1,3,2], [2,1,3]...

2013-10-20 15:29:24

阅读数:384

评论数:0

CODE 85: Rotate Image

You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up: Could you do this in-place? ...

2013-10-19 00:28:46

阅读数:446

评论数:0

CODE 84: Anagrams

Given an array of strings, return all groups of strings that are anagrams. Note: All inputs will be in lower-case. public ArrayList anagrams...

2013-10-18 21:52:12

阅读数:420

评论数:0

转一篇有关JAVA的内存泄露的文章

http://www.lybbs.net/news_read.do?newsPath=2007/9/25/1190684628458.html   1 引言      Java的一个重要优点就是通过垃圾收集器GC (Garbage Collection)自动管理内存的回收,程序员不需要通...

2013-10-17 19:27:14

阅读数:399

评论数:0

CODE 83: Pow(x, n)

Implement pow(x, n). public double pow(double x, int n) { // Note: The Solution object is instantiated only once and is reused by // each tes...

2013-10-16 23:17:57

阅读数:621

评论数:0

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