摘要:
Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. The algorithm should run in linear time and in O(1) space. 思路 阅读全文
posted @ 2016-09-28 03:41
Machelsky
阅读(115)
评论(0)
推荐(0)
摘要:
Find the sum of all left leaves in a given binary tree. Example: 3 / \ 9 20 / \ 15 7 There are two left leaves in the binary tree, with values 9 and 1 阅读全文
posted @ 2016-09-28 02:02
Machelsky
阅读(208)
评论(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-09-28 01:45
Machelsky
阅读(125)
评论(0)
推荐(0)