上一页 1 2 3 4 5 6 7 ··· 40 下一页
摘要: Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array will be 阅读全文
posted @ 2017-05-30 01:07 amazingzoe 阅读(851) 评论(0) 推荐(1) 编辑
摘要: We define a harmonious array is an array where the difference between its maximum value and its minimum value is exactly 1. Now, given an integer arra 阅读全文
posted @ 2017-05-29 14:32 amazingzoe 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a 阅读全文
posted @ 2017-05-22 14:43 amazingzoe 阅读(109) 评论(0) 推荐(0) 编辑
摘要: In MATLAB, there is a very useful function called 'reshape', which can reshape a matrix into a new one with different size but keep its original data. 阅读全文
posted @ 2017-05-09 15:07 amazingzoe 阅读(248) 评论(0) 推荐(0) 编辑
摘要: Given two strings representing two complex numbers. You need to return a string representing their multiplication. Note i2 = -1 according to the defin 阅读全文
posted @ 2017-05-05 14:11 amazingzoe 阅读(192) 评论(0) 推荐(0) 编辑
摘要: We define the Perfect Number is a positive integer that is equal to the sum of all its positive divisors except itself. Now, given an integer n, write 阅读全文
posted @ 2017-05-04 14:05 amazingzoe 阅读(129) 评论(0) 推荐(0) 编辑
摘要: Given a binary tree, return the tilt of the whole tree. The tilt of a tree node is defined as the absolute difference between the sum of all left subt 阅读全文
posted @ 2017-05-01 13:12 amazingzoe 阅读(186) 评论(0) 推荐(0) 编辑
摘要: Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. The longest uncommon subsequence is defi 阅读全文
posted @ 2017-04-29 14:49 amazingzoe 阅读(185) 评论(0) 推荐(0) 编辑
摘要: Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of 阅读全文
posted @ 2017-04-28 13:44 amazingzoe 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Given a string, find the length of the longest substring T that contains at most k distinct characters. For example, Given s = “eceba” and k = 2, T is 阅读全文
posted @ 2017-04-26 13:02 amazingzoe 阅读(142) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 40 下一页