摘要: Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), some elements appear twice and others appear once. Find all the elements that appear twi 阅读全文
posted @ 2017-09-20 07:44 Jimmy_Cheng 阅读(307) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexi 阅读全文
posted @ 2017-09-20 04:30 Jimmy_Cheng 阅读(273) 评论(0) 推荐(0) 编辑
摘要: Design a data structure that supports all following operations in average O(1) time. Note: Duplicate elements are allowed. insert(val): Inserts an ite 阅读全文
posted @ 2017-09-20 02:31 Jimmy_Cheng 阅读(264) 评论(0) 推荐(0) 编辑