摘要:
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-04-11 23:49 cKK 阅读(117) 评论(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-04-11 23:49 cKK 阅读(117) 评论(0) 推荐(0) 编辑
摘要:
You are playing the following Nim Game with your friend: There is a heap of stones on the table, each time one of you take turns to remove 1 to 3 ston 阅读全文
posted @ 2016-04-11 21:10 cKK 阅读(119) 评论(0) 推荐(0) 编辑
摘要:
Given an array and a value, remove all instances of that value in place and return the new length. Do not allocate extra space for another array, you 阅读全文
posted @ 2016-04-11 20:03 cKK 阅读(114) 评论(0) 推荐(0) 编辑
摘要:
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo 阅读全文
posted @ 2016-04-11 02:43 cKK 阅读(136) 评论(0) 推荐(0) 编辑 |
||