摘要: 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 tur 阅读全文
posted @ 2016-09-27 16:23 Machelsky 阅读(109) 评论(0) 推荐(0)
摘要: Given a string, determine if a permutation of the string could form a palindrome. For example,"code" -> False, "aab" -> True, "carerac" -> True. 思路:ha 阅读全文
posted @ 2016-09-27 15:22 Machelsky 阅读(175) 评论(0) 推荐(0)
摘要: Given an array nums and a target value k, find the maximum length of a subarray that sums to k. If there isn't one, return 0 instead. Example 1: Given 阅读全文
posted @ 2016-09-27 14:51 Machelsky 阅读(151) 评论(0) 推荐(0)
摘要: Given an array of n positive integers and a positive integer s, find the minimal length of a subarray of which the sum ≥ s. If there isn't one, return 阅读全文
posted @ 2016-09-27 14:10 Machelsky 阅读(131) 评论(0) 推荐(0)
摘要: Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two 阅读全文
posted @ 2016-09-27 11:41 Machelsky 阅读(165) 评论(0) 推荐(0)