摘要: 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 array is non-empty and the majority element always exist in the array. 阅读全文
posted @ 2015-07-19 16:47 华科小涛 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Simple add() method is used for adding an element at the end of the list however there is another variant of add method which is used for adding an element to the specified index. 阅读全文
posted @ 2015-07-19 11:23 华科小涛 阅读(976) 评论(0) 推荐(0) 编辑