上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 49 下一页
摘要: 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-10-24 10:34 daniel456 阅读(86) 评论(0) 推荐(0)
摘要: Implement a magic directory with buildDict, and search methods. For the method buildDict, you'll be given a list of non-repetitive words to build a di 阅读全文
posted @ 2017-10-24 10:31 daniel456 阅读(130) 评论(0) 推荐(0)
摘要: Given a string, sort it in decreasing order based on the frequency of characters. Example 1: Example 2: Example 3: 阅读全文
posted @ 2017-10-23 21:51 daniel456 阅读(125) 评论(0) 推荐(0)
摘要: TinyURL is a URL shortening service where you enter a URL such as https://leetcode.com/problems/design-tinyurl and it returns a short URL such as http 阅读全文
posted @ 2017-10-23 21:42 daniel456 阅读(130) 评论(0) 推荐(0)
摘要: Given an array of integers, every element appears twice except for one. Find that single one. 题目含义:给定的数组中,每个数字出现两次,只有一个数字出现了一次,找出这个数字 阅读全文
posted @ 2017-10-23 21:21 daniel456 阅读(102) 评论(0) 推荐(0)
摘要: Suppose Andy and Doris want to choose a restaurant for dinner, and they both have a list of favorite restaurants represented by strings. You need to h 阅读全文
posted @ 2017-10-23 21:20 daniel456 阅读(169) 评论(0) 推荐(0)
摘要: We define a harmonious array is an array where the difference between its maximum value and its minimum value is exactly 1. Now, given an integer arra 阅读全文
posted @ 2017-10-23 21:15 daniel456 阅读(102) 评论(0) 推荐(0)
摘要: Given an integer array with even length, where different numbers in this array represent different kinds of candies. Each number means one candy of th 阅读全文
posted @ 2017-10-23 21:12 daniel456 阅读(128) 评论(0) 推荐(0)
摘要: Given two strings s and t, write a function to determine if t is an anagram of s. For example,s = "anagram", t = "nagaram", return true.s = "rat", t = 阅读全文
posted @ 2017-10-23 21:05 daniel456 阅读(87) 评论(0) 推荐(0)
摘要: Given two arrays, write a function to compute their intersection. Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2]. Note: Each element i 阅读全文
posted @ 2017-10-23 21:00 daniel456 阅读(108) 评论(0) 推荐(0)
上一页 1 ··· 24 25 26 27 28 29 30 31 32 ··· 49 下一页