上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页

2016年2月7日

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 algorithm s 阅读全文

posted @ 2016-02-07 15:05 walkwalkwalk 阅读(255) 评论(0) 推荐(0) 编辑

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. Each num 阅读全文

posted @ 2016-02-07 15:03 walkwalkwalk 阅读(147) 评论(0) 推荐(0) 编辑

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 repeat 阅读全文

posted @ 2016-02-07 15:02 walkwalkwalk 阅读(148) 评论(0) 推荐(0) 编辑

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 will be 阅读全文

posted @ 2016-02-07 14:48 walkwalkwalk 阅读(217) 评论(0) 推荐(0) 编辑

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 or 阅读全文

posted @ 2016-02-07 12:09 walkwalkwalk 阅读(158) 评论(0) 推荐(0) 编辑

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 the or 阅读全文

posted @ 2016-02-07 11:39 walkwalkwalk 阅读(179) 评论(0) 推荐(0) 编辑

2016年2月6日

Longest Valid Parentheses

摘要: Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. For "(()", the lo 阅读全文

posted @ 2016-02-06 20:03 walkwalkwalk 阅读(191) 评论(0) 推荐(0) 编辑

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 target va 阅读全文

posted @ 2016-02-06 19:33 walkwalkwalk 阅读(176) 评论(0) 推荐(0) 编辑

Next Permutation

摘要: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib 阅读全文

posted @ 2016-02-06 18:06 walkwalkwalk 阅读(168) 评论(0) 推荐(0) 编辑

2016年2月4日

Divide Two Integers

摘要: Divide two integers without using multiplication, division and mod operator. If it is overflow, return MAX_INT. Subscribe to see which companies asked 阅读全文

posted @ 2016-02-04 22:28 walkwalkwalk 阅读(148) 评论(0) 推荐(0) 编辑

上一页 1 ··· 4 5 6 7 8 9 10 11 12 13 下一页

导航