上一页 1 ··· 53 54 55 56 57 58 59 60 61 ··· 64 下一页
摘要: 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 @ 2020-03-07 10:05 CNoodle 阅读(212) 评论(0) 推荐(0)
摘要: Given an unsorted integer array nums, return the smallest missing positive integer. You must implement an algorithm that runs in O(n) time and uses co 阅读全文
posted @ 2020-03-06 10:15 CNoodle 阅读(551) 评论(0) 推荐(0)
摘要: Given a string s, reverse only all the vowels in the string and return it. The vowels are 'a', 'e', 'i', 'o', and 'u', and they can appear in both cas 阅读全文
posted @ 2020-03-06 04:29 CNoodle 阅读(215) 评论(0) 推荐(0)
摘要: Given an array nums of distinct integers, return all the possible permutations. You can return the answer in any order. Example 1: Input: nums = [1,2, 阅读全文
posted @ 2020-03-05 08:57 CNoodle 阅读(573) 评论(0) 推荐(0)
摘要: A permutation of an array of integers is an arrangement of its members into a sequence or linear order. For example, for arr = [1,2,3], the following 阅读全文
posted @ 2020-03-05 08:39 CNoodle 阅读(472) 评论(0) 推荐(0)
摘要: You are given two lists of closed intervals, firstList and secondList, where firstList[i] = [starti, endi] and secondList[j] = [startj, endj]. Each li 阅读全文
posted @ 2020-03-05 03:47 CNoodle 阅读(334) 评论(0) 推荐(0)
摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim 阅读全文
posted @ 2020-03-05 03:14 CNoodle 阅读(447) 评论(0) 推荐(0)
摘要: Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maxim 阅读全文
posted @ 2020-03-04 15:14 CNoodle 阅读(443) 评论(0) 推荐(0)
摘要: There are some spherical balloons taped onto a flat wall that represents the XY-plane. The balloons are represented as a 2D integer array points where 阅读全文
posted @ 2020-03-04 13:09 CNoodle 阅读(305) 评论(0) 推荐(0)
摘要: Implement a last-in-first-out (LIFO) stack using only two queues. The implemented stack should support all the functions of a normal stack (push, top, 阅读全文
posted @ 2020-03-04 09:51 CNoodle 阅读(258) 评论(0) 推荐(0)
摘要: Implement a first in first out (FIFO) queue using only two stacks. The implemented queue should support all the functions of a normal queue (push, pee 阅读全文
posted @ 2020-03-04 04:00 CNoodle 阅读(256) 评论(0) 推荐(0)
摘要: The boundary of a binary tree is the concatenation of the root, the left boundary, the leaves ordered from left-to-right, and the reverse order of the 阅读全文
posted @ 2020-03-03 04:47 CNoodle 阅读(329) 评论(0) 推荐(0)
摘要: You are given an array of logs. Each log is a space-delimited string of words, where the first word is the identifier. There are two types of logs: Le 阅读全文
posted @ 2020-03-03 02:14 CNoodle 阅读(195) 评论(0) 推荐(0)
摘要: Design a data structure that follows the constraints of a Least Recently Used (LRU) cache. Implement the LRUCache class: LRUCache(int capacity) Initia 阅读全文
posted @ 2020-03-01 06:26 CNoodle 阅读(506) 评论(0) 推荐(0)
摘要: Given a sorted integer array nums and three integers a, b and c, apply a quadratic function of the form f(x) = ax2 + bx + c to each element nums[i] in 阅读全文
posted @ 2020-02-29 09:12 CNoodle 阅读(179) 评论(0) 推荐(0)
摘要: Given an integer array nums sorted in non-decreasing order, return an array of the squares of each number sorted in non-decreasing order. Example 1: I 阅读全文
posted @ 2020-02-29 08:19 CNoodle 阅读(161) 评论(0) 推荐(0)
摘要: Given the root of a binary tree, imagine yourself standing on the right side of it, return the values of the nodes you can see ordered from top to bot 阅读全文
posted @ 2020-02-29 07:39 CNoodle 阅读(272) 评论(0) 推荐(0)
摘要: Given an m x n matrix mat, return an array of all the elements of the array in a diagonal order. Example 1: Input: mat = [[1,2,3],[4,5,6],[7,8,9]] Out 阅读全文
posted @ 2020-02-29 05:23 CNoodle 阅读(173) 评论(0) 推荐(0)
摘要: Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Clarification: What shoul 阅读全文
posted @ 2020-02-29 03:13 CNoodle 阅读(536) 评论(0) 推荐(0)
摘要: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. Implement the MinStack class: MinStack() initializes 阅读全文
posted @ 2020-02-18 02:07 CNoodle 阅读(409) 评论(0) 推荐(0)
上一页 1 ··· 53 54 55 56 57 58 59 60 61 ··· 64 下一页