上一页 1 ··· 41 42 43 44 45 46 47 48 49 ··· 72 下一页
摘要: 和为定值的m个数 np 问题(时间复杂度o(2**n)) code1: 暴力递归 解决 只有正数的情况 阅读全文
posted @ 2018-02-20 23:43 乐乐章 阅读(278) 评论(0) 推荐(0)
摘要: Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, 阅读全文
posted @ 2018-02-20 23:09 乐乐章 阅读(211) 评论(0) 推荐(0)
摘要: Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. For exampl 阅读全文
posted @ 2018-02-18 16:20 乐乐章 阅读(214) 评论(0) 推荐(0)
摘要: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases. For example,"A man, a plan, a canal: Pan 阅读全文
posted @ 2018-02-18 15:53 乐乐章 阅读(192) 评论(0) 推荐(0)
摘要: Determine whether an integer is a palindrome. Do this without extra space. 阅读全文
posted @ 2018-02-18 15:26 乐乐章 阅读(166) 评论(0) 推荐(0)
摘要: Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example: Input: "babad" Output: "b 阅读全文
posted @ 2018-02-18 15:17 乐乐章 阅读(418) 评论(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: Input: haystac 阅读全文
posted @ 2018-02-17 20:56 乐乐章 阅读(244) 评论(0) 推荐(0)
摘要: The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order,We get the following sequence 阅读全文
posted @ 2018-02-15 13:08 乐乐章 阅读(299) 评论(0) 推荐(0)
摘要: Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example,[1,1,2] have the following unique pe 阅读全文
posted @ 2018-02-14 19:57 乐乐章 阅读(189) 评论(0) 推荐(0)
摘要: Given a collection of distinct numbers, return all possible permutations. For example,[1,2,3] have the following permutations: [ [1,2,3], [1,3,2], [2, 阅读全文
posted @ 2018-02-14 19:49 乐乐章 阅读(1693) 评论(0) 推荐(0)
上一页 1 ··· 41 42 43 44 45 46 47 48 49 ··· 72 下一页