摘要: 。。 阅读全文
posted @ 2016-08-31 23:10 琴影 阅读(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 @ 2016-08-31 23:04 琴影 阅读(348) 评论(0) 推荐(0) 编辑
摘要: Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the rans 阅读全文
posted @ 2016-08-31 22:37 琴影 阅读(243) 评论(0) 推荐(0) 编辑
摘要: Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and then add one more letter at 阅读全文
posted @ 2016-08-31 22:18 琴影 阅读(1307) 评论(0) 推荐(1) 编辑
摘要: Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. For example: Given num = 38, the process is like: 阅读全文
posted @ 2016-08-31 21:48 琴影 阅读(191) 评论(0) 推荐(0) 编辑