上一页 1 2 3 4 5 6 7 8 ··· 15 下一页
摘要: Given an unsorted integer array, find the smallest missing positive integer. Example 1: Example 2: Example 3: Note: Your algorithm should run in O(n) 阅读全文
posted @ 2019-02-04 11:01 TobicYAL 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numb 阅读全文
posted @ 2019-02-03 22:28 TobicYAL 阅读(234) 评论(0) 推荐(0) 编辑
摘要: Given a set of candidate numbers (candidates) (without duplicates) and a target number (target), find all unique combinations in candidates where the 阅读全文
posted @ 2019-02-03 17:16 TobicYAL 阅读(137) 评论(0) 推荐(0) 编辑
摘要: The count-and-say sequence is the sequence of integers with the first five terms as following: 1 is read off as "one 1" or 11.11 is read off as "two 1 阅读全文
posted @ 2019-02-03 16:40 TobicYAL 阅读(130) 评论(0) 推荐(0) 编辑
摘要: Write a program to solve a Sudoku puzzle by filling the empty cells. A sudoku solution must satisfy all of the following rules: Empty cells are indica 阅读全文
posted @ 2019-02-03 15:32 TobicYAL 阅读(193) 评论(0) 推荐(0) 编辑
摘要: Determine if a 9x9 Sudoku board is valid. Only the filled cells need to be validated according to the following rules: A partially filled sudoku which 阅读全文
posted @ 2019-02-03 14:08 TobicYAL 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 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 @ 2019-02-03 11:47 TobicYAL 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime com 阅读全文
posted @ 2019-02-02 22:54 TobicYAL 阅读(121) 评论(0) 推荐(0) 编辑
摘要: Suppose an array sorted in ascending order 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]). Y 阅读全文
posted @ 2019-02-02 22:14 TobicYAL 阅读(118) 评论(0) 推荐(0) 编辑
摘要: Given a string containing just the characters '(' and ')', find the length of the longest valid (well-formed) parentheses substring. Example 1: Exampl 阅读全文
posted @ 2019-02-01 19:05 TobicYAL 阅读(127) 评论(0) 推荐(0) 编辑
摘要: Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possib 阅读全文
posted @ 2019-02-01 14:07 TobicYAL 阅读(130) 评论(0) 推荐(0) 编辑
摘要: You are given a string, s, and a list of words, words, that are all of the same length. Find all starting indices of substring(s) in s that is a conca 阅读全文
posted @ 2019-01-31 11:41 TobicYAL 阅读(152) 评论(0) 推荐(0) 编辑
摘要: Given two integers dividend and divisor, divide two integers without using multiplication, division and mod operator. Return the quotient after dividi 阅读全文
posted @ 2019-01-30 17:02 TobicYAL 阅读(139) 评论(0) 推荐(0) 编辑
摘要: Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Example 1: Example 2: Cla 阅读全文
posted @ 2019-01-30 11:32 TobicYAL 阅读(123) 评论(0) 推荐(0) 编辑
摘要: Given an array nums and a value val, remove all instances of that value in-placeand return the new length. Do not allocate extra space for another arr 阅读全文
posted @ 2019-01-30 10:48 TobicYAL 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra spa 阅读全文
posted @ 2019-01-30 10:35 TobicYAL 阅读(148) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. k is a positive integer and is less than or equal to 阅读全文
posted @ 2019-01-30 10:16 TobicYAL 阅读(126) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, swap every two adjacent nodes and return its head. Example: Note: Your algorithm should use only constant extra space. You may no 阅读全文
posted @ 2019-01-30 09:31 TobicYAL 阅读(144) 评论(0) 推荐(0) 编辑
摘要: Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity. Example: 1 struct cmp { 2 bool operator () (ListNod 阅读全文
posted @ 2019-01-29 18:38 TobicYAL 阅读(176) 评论(0) 推荐(0) 编辑
摘要: Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: 1 阅读全文
posted @ 2019-01-29 15:15 TobicYAL 阅读(141) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 15 下一页