摘要:
Given a non-empty array of integers, return the k most frequent elements. For example,Given [1,1,1,2,2,3] and k = 2, return [1,2]. Note: You may assum 阅读全文
posted @ 2017-02-19 19:27
amazingzoe
阅读(148)
评论(0)
推荐(0)
摘要:
Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), write a function to find the number of connected 阅读全文
posted @ 2017-02-19 19:17
amazingzoe
阅读(180)
评论(0)
推荐(0)
摘要:
Given two 1d vectors, implement an iterator to return their elements alternately. For example, given two 1d vectors: By calling next repeatedly until 阅读全文
posted @ 2017-02-19 17:44
amazingzoe
阅读(165)
评论(0)
推荐(0)
摘要:
Given an array of numbers nums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find the two elements 阅读全文
posted @ 2017-02-19 17:32
amazingzoe
阅读(119)
评论(0)
推荐(0)
摘要:
Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Input: "tree" Output: "eert" Explanation: 'e' appears twi 阅读全文
posted @ 2017-02-19 16:36
amazingzoe
阅读(158)
评论(0)
推荐(0)
浙公网安备 33010602011771号