上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 40 下一页
摘要: 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 @ 2016-11-18 06:14 amazingzoe 阅读(183) 评论(0) 推荐(0)
摘要: Assume you are an awesome parent and want to give your children some cookies. But, you should give each child at most one cookie. Each child i has a g 阅读全文
posted @ 2016-11-17 01:25 amazingzoe 阅读(358) 评论(0) 推荐(0)
摘要: Given n points in the plane that are all pairwise distinct, a "boomerang" is a tuple of points (i, j, k) such that the distance between iand j equals 阅读全文
posted @ 2016-11-08 09:05 amazingzoe 阅读(215) 评论(0) 推荐(0)
摘要: There is a fence with n posts, each post can be painted with one of the k colors. You have to paint all the posts such that no more than two adjacent 阅读全文
posted @ 2016-11-04 00:26 amazingzoe 阅读(124) 评论(0) 推荐(0)
摘要: You are given a binary tree in which each node contains an integer value. Find the number of paths that sum to a given value. The path does not need t 阅读全文
posted @ 2016-11-03 11:50 amazingzoe 阅读(182) 评论(0) 推荐(0)
摘要: Given a sequence of words, check whether it forms a valid word square. A sequence of words forms a valid word square if the kth row and column read th 阅读全文
posted @ 2016-11-03 11:35 amazingzoe 阅读(156) 评论(0) 推荐(0)
摘要: Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -. Example:Given a = 1 and b = 2, return 3. 阅读全文
posted @ 2016-11-01 06:34 amazingzoe 阅读(100) 评论(0) 推荐(0)
摘要: Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements of [1, n] inclu 阅读全文
posted @ 2016-11-01 06:20 amazingzoe 阅读(521) 评论(1) 推荐(0)
摘要: Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Examples: Note: You may assume the 阅读全文
posted @ 2016-10-24 23:29 amazingzoe 阅读(384) 评论(0) 推荐(0)
摘要: You are playing the following Flip Game with your friend: Given a string that contains only these two characters: + and -, you and your friend take tu 阅读全文
posted @ 2016-10-15 06:50 amazingzoe 阅读(171) 评论(0) 推荐(0)
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 40 下一页