摘要:
Given an array intervals where intervals[i] = [li, ri] represent the interval [li, ri), remove all intervals that are covered by another interval in t 阅读全文
摘要:
Given an integer array nums, return the number of triplets chosen from the array that can make triangles if we take them as side lengths of a triangle 阅读全文
摘要:
Given m arrays, and each array is sorted in ascending order. Now you can pick up two integers from two different arrays (each array picks one) and cal 阅读全文
摘要:
You have a RecentCounter class which counts the number of recent requests within a certain time frame. Implement the RecentCounter class: RecentCounte 阅读全文
摘要:
Given an unsorted array, find the maximum difference between the successive elements in its sorted form. Return 0 if the array contains less than 2 el 阅读全文
摘要:
In a deck of cards, each card has an integer written on it. Return true if and only if you can choose X >= 2 such that it is possible to split the ent 阅读全文
摘要:
Given the root of a binary tree, return an array of the largest value in each row of the tree (0-indexed). Example 1: Input: root = [1,3,2,5,3,null,9] 阅读全文
摘要:
Given an array of events where events[i] = [startDayi, endDayi]. Every event i starts at startDayi and ends at endDayi. You can attend an event i at a 阅读全文
摘要:
We have n buildings numbered from 0 to n - 1. Each building has a number of employees. It's transfer season, and some employees want to change the bui 阅读全文
摘要:
A kingdom consists of a king, his children, his grandchildren, and so on. Every once in a while, someone in the family dies or a child is born. The ki 阅读全文
摘要:
You are the operator of a Centennial Wheel that has four gondolas, and each gondola has room for up to four people. You have the ability to rotate the 阅读全文
摘要:
The Leetcode file system keeps a log each time some user performs a change folder operation. The operations are described below: "../" : Move to the p 阅读全文
摘要:
There are a total of numCourses courses you have to take, labeled from 0 to numCourses - 1. You are given an array prerequisites where prerequisites[i 阅读全文
摘要:
You are given an array of n pairs pairs where pairs[i] = [lefti, righti] and lefti < righti. A pair p2 = [c, d] follows a pair p1 = [a, b] if b < c. A 阅读全文
摘要:
Given an integer array nums, return all the different possible non-decreasing subsequences of the given array with at least two elements. You may retu 阅读全文
摘要:
Given the head of a singly linked list, sort the list using insertion sort, and return the sorted list's head. The steps of the insertion sort algorit 阅读全文
摘要:
Given a node from a Circular Linked List which is sorted in ascending order, write a function to insert a value insertVal into the list such that it r 阅读全文
摘要:
Given a binary search tree (BST) with duplicates, find all the mode(s) (the most frequently occurred element) in the given BST. Assume a BST is define 阅读全文
摘要:
Given a list of the scores of different students, items, where items[i] = [IDi, scorei] represents one score from a student with IDi, calculate each s 阅读全文
摘要:
Given an array nums sorted in non-decreasing order, and a number target, return True if and only if target is a majority element. A majority element i 阅读全文