上一页 1 2 3 4 5 6 7 ··· 11 下一页
摘要: Problem statement: Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorite restaurants represented by str 阅读全文
posted @ 2017-05-29 03:51 蓝色地中海 阅读(699) 评论(0) 推荐(0)
摘要: Problem statement: Given an m * n matrix M initialized with all 0's and several update operations. Operations are represented by a 2D array, and each 阅读全文
posted @ 2017-05-29 03:16 蓝色地中海 阅读(251) 评论(0) 推荐(0)
摘要: Problem statement: Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum 阅读全文
posted @ 2017-05-29 03:01 蓝色地中海 阅读(226) 评论(0) 推荐(0)
摘要: Problem statement: Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. The algorithm should run in linear time an 阅读全文
posted @ 2017-05-29 02:50 蓝色地中海 阅读(108) 评论(0) 推荐(0)
摘要: Problem statement: Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. You 阅读全文
posted @ 2017-05-27 04:31 蓝色地中海 阅读(134) 评论(0) 推荐(0)
摘要: Problem statement: Given two strings s1 and s2, write a function to return true if s2 contains the permutation of s1. In other words, one of the first 阅读全文
posted @ 2017-05-24 09:43 蓝色地中海 阅读(396) 评论(0) 推荐(0)
摘要: Problem statement: Given a string that consists of only uppercase English letters, you can replace any letter in the string with another letter at mos 阅读全文
posted @ 2017-05-24 01:31 蓝色地中海 阅读(349) 评论(0) 推荐(0)
摘要: Problem statement: Given a string representing an expression of fraction addition and subtraction, you need to return the calculation result in string 阅读全文
posted @ 2017-05-22 05:02 蓝色地中海 阅读(218) 评论(0) 推荐(0)
摘要: Problem statement: Given the coordinates of four points in 2D space, return whether the four points could construct a square. The coordinate (x,y) of 阅读全文
posted @ 2017-05-22 03:32 蓝色地中海 阅读(205) 评论(0) 推荐(0)
摘要: Problem statement: We define a harmonious array is an array where the difference between its maximum value and its minimum value is exactly 1. Now, gi 阅读全文
posted @ 2017-05-22 03:02 蓝色地中海 阅读(889) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 ··· 11 下一页