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

LeetCode-89-Gray Code

摘要: 算法描述: The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the tot 阅读全文
posted @ 2019-02-01 16:22 无名路人甲 阅读(85) 评论(0) 推荐(0) 编辑

LeetCode-86-Partition List

摘要: 算法描述: Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x. You should preserv 阅读全文
posted @ 2019-02-01 13:18 无名路人甲 阅读(74) 评论(0) 推荐(0) 编辑

LeetCode-82-Remove Duplicates from Sorted List II

摘要: 算法描述: Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinct numbers from the original list. Example 1: Examp 阅读全文
posted @ 2019-02-01 12:48 无名路人甲 阅读(84) 评论(0) 推荐(0) 编辑

LeetCode-81-Search in Rotated Sorted Array II

摘要: 算法描述: Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,0,1,2,2,5,6] might become [2,5,6,0,0,1, 阅读全文
posted @ 2019-02-01 12:18 无名路人甲 阅读(66) 评论(0) 推荐(0) 编辑

LeetCode-80-Remove Duplicates from Sorted Array II

摘要: 算法描述: Given a sorted array nums, remove the duplicates in-place such that duplicates appeared at most twice and return the new length. Do not allocate 阅读全文
posted @ 2019-02-01 11:39 无名路人甲 阅读(82) 评论(0) 推荐(0) 编辑

LeetCode-79-Word Search

摘要: 算法描述: Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where 阅读全文
posted @ 2019-02-01 10:46 无名路人甲 阅读(89) 评论(0) 推荐(0) 编辑

LeetCode-78-Subset

摘要: 算法描述: Given a set of distinct integers, nums, return all possible subsets (the power set). Note: The solution set must not contain duplicate subsets. 阅读全文
posted @ 2019-02-01 09:45 无名路人甲 阅读(76) 评论(0) 推荐(0) 编辑

LeetCode-77-Combinations

摘要: 算法描述: Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. Example: 解题思路:题目要求给出所有肯能的组合,首先想到了回溯法。需要注意的是下一次迭代的起始是i+ 阅读全文
posted @ 2019-02-01 09:34 无名路人甲 阅读(87) 评论(0) 推荐(0) 编辑

LeetCode-75-Sort Colors

摘要: 算法描述: Given an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, with the colors in 阅读全文
posted @ 2019-02-01 09:12 无名路人甲 阅读(80) 评论(0) 推荐(0) 编辑

LeetCode-73-Set Matrix Zeroes

摘要: 算法描述: Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place. Example 1: Example 2: Follow up: A straight forwar 阅读全文
posted @ 2019-01-31 20:32 无名路人甲 阅读(73) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 下一页