上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 30 下一页

2018年1月3日

subsets II

摘要: Given a collection of integers that might contain duplicates, nums, return all possible subsets (the power set). Note: The solution set must not conta 阅读全文

posted @ 2018-01-03 12:22 夜的第八章 阅读(116) 评论(0) 推荐(0) 编辑

subsets(子集)

摘要: Given a set of distinct integers, nums, return all possible subsets (the power set). Note: The solution set must not contain duplicate subsets. For ex 阅读全文

posted @ 2018-01-03 11:01 夜的第八章 阅读(152) 评论(0) 推荐(0) 编辑

2018年1月2日

combinations(组合)

摘要: Given two integers n and k, return all possible combinations of k numbers out of 1 ... n. For example,If n = 4 and k = 2, a solution is: 从1,。。。,n中选出k个 阅读全文

posted @ 2018-01-02 21:59 夜的第八章 阅读(184) 评论(0) 推荐(0) 编辑

Group Anagrams 群组错位词

摘要: Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Return: Note: All inputs will be i 阅读全文

posted @ 2018-01-02 21:27 夜的第八章 阅读(147) 评论(0) 推荐(0) 编辑

rotate image(旋转数组)

摘要: You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Note:You have to rotate the image in-place, which 阅读全文

posted @ 2018-01-02 20:28 夜的第八章 阅读(174) 评论(0) 推荐(0) 编辑

permutations II(全排列 2)

摘要: 题目要求 对于其基础题PermutationsI请参考我的另一篇博客这里添加的难度在于,排列组合的数字中可能存在重复。这就需要想方法,将结果集中重复的结果删去。而这里,我参考了另一名答题者的答案,在试图将数字添入结果集中时,就判断会不会产生重复的结果,从而使避免重复。 PermutationsI也可 阅读全文

posted @ 2018-01-02 19:46 夜的第八章 阅读(1152) 评论(0) 推荐(0) 编辑

multiply Strings

摘要: 参考:https://www.cnblogs.com/TenosDoIt/p/3735309.html Given two numbers represented as strings, return multiplication of the numbers as a string. Note: 阅读全文

posted @ 2018-01-02 16:31 夜的第八章 阅读(108) 评论(0) 推荐(0) 编辑

2017年12月29日

unique paths

摘要: A robot is located at the top-left corner of a m x n grid (marked 'Start' in the diagram below). The robot can only move either down or right at any p 阅读全文

posted @ 2017-12-29 16:10 夜的第八章 阅读(196) 评论(0) 推荐(0) 编辑

2017年12月28日

search for a range(找出一个数在数组中开始和结束位置)

摘要: Given an array of integers sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime complexi 阅读全文

posted @ 2017-12-28 17:24 夜的第八章 阅读(457) 评论(0) 推荐(0) 编辑

2017年12月26日

permutations(全排列)

摘要: Given a collection of distinct numbers, return all possible permutations. For example,[1,2,3] have the following permutations: 这题是列举所有情况,回溯。 每次都是从头开始遍 阅读全文

posted @ 2017-12-26 22:10 夜的第八章 阅读(312) 评论(0) 推荐(0) 编辑

上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 30 下一页

导航