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 夜的第八章 阅读(190) 评论(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 夜的第八章 阅读(156) 评论(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 夜的第八章 阅读(182) 评论(0) 推荐(0)

permutations II(全排列 2)

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

posted @ 2018-01-02 19:46 夜的第八章 阅读(1197) 评论(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 夜的第八章 阅读(116) 评论(0) 推荐(0)

导航