上一页 1 ··· 6 7 8 9 10 11 下一页
摘要: Given a string s and a non-empty string p, find all the start indices of p's anagrams in s. Strings consists of lowercase English letters only and the 阅读全文
posted @ 2017-01-18 11:43 璨璨要好好学习 阅读(116) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty string check if it can be constructed by taking a substring of it and appending multiple copies of the substring together. You may a 阅读全文
posted @ 2017-01-16 10:46 璨璨要好好学习 阅读(158) 评论(0) 推荐(0) 编辑
摘要: Given a non-negative integer represented as a non-empty array of digits, plus one to the integer. You may assume the integer do not contain any leadin 阅读全文
posted @ 2017-01-16 09:31 璨璨要好好学习 阅读(568) 评论(0) 推荐(0) 编辑
摘要: Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: 这道题不能用long会越界,所以只能用string直接来append。精髓在于设置一 阅读全文
posted @ 2017-01-16 04:28 璨璨要好好学习 阅读(218) 评论(0) 推荐(0) 编辑
摘要: Given a string which consists of lowercase or uppercase letters, find the length of the longest palindromes that can be built with those letters. This 阅读全文
posted @ 2017-01-15 09:44 璨璨要好好学习 阅读(134) 评论(0) 推荐(0) 编辑
摘要: Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You may assume that the 阅读全文
posted @ 2017-01-15 08:48 璨璨要好好学习 阅读(99) 评论(0) 推荐(0) 编辑
摘要: Ugly number is a number that only have factors 2, 3and 5. Design an algorithm to find the nth ugly number. The first 10 ugly numbers are 1, 2, 3, 4, 5 阅读全文
posted @ 2017-01-10 09:42 璨璨要好好学习 阅读(95) 评论(0) 推荐(0) 编辑
摘要: Implement a stack with min() function, which will return the smallest number in the stack. It should support push, pop and min operation all in O(1) c 阅读全文
posted @ 2017-01-10 06:37 璨璨要好好学习 阅读(120) 评论(0) 推荐(0) 编辑
摘要: Given an array nums of integers and an int k, partition the array (i.e move the elements in "nums") such that: All elements < k are moved to the left 阅读全文
posted @ 2017-01-09 10:17 璨璨要好好学习 阅读(111) 评论(0) 推荐(0) 编辑
摘要: Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two n 阅读全文
posted @ 2017-01-09 08:59 璨璨要好好学习 阅读(127) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 下一页