上一页 1 ··· 33 34 35 36 37
摘要: Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Example 2: Example 3: 首先用hashmap扫一遍string,统计频率。按频率排序,将ha 阅读全文
posted @ 2018-11-20 13:30 fatttcat 阅读(119) 评论(0) 推荐(0) 编辑
摘要: Given a non-empty array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runti 阅读全文
posted @ 2018-11-20 13:01 fatttcat 阅读(113) 评论(0) 推荐(0) 编辑
摘要: Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element. Example 阅读全文
posted @ 2018-11-20 12:22 fatttcat 阅读(154) 评论(0) 推荐(0) 编辑
摘要: Design a class to find the kth largest element in a stream. Note that it is the kth largest element in the sorted order, not the kth distinct element. 阅读全文
posted @ 2018-11-20 12:00 fatttcat 阅读(125) 评论(0) 推荐(0) 编辑
摘要: Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. 阅读全文
posted @ 2018-11-20 03:07 fatttcat 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Given an array of meeting time intervals consisting of start and end times [[s1,e1],[s2,e2],...] (si < ei), find the minimum number of conference room 阅读全文
posted @ 2018-11-19 16:36 fatttcat 阅读(138) 评论(0) 推荐(0) 编辑
上一页 1 ··· 33 34 35 36 37