10 2020 档案

摘要:Number of Longest Increasing Subsequence (M) 题目 Given an integer array nums, return the number of longest increasing subsequences. Example 1: Input: n 阅读全文
posted @ 2020-10-30 21:40 墨云黑 阅读(119) 评论(0) 推荐(0)
摘要:Maximize Distance to Closest Person (M) 题目 You are given an array representing a row of seats where seats[i] = 1 represents a person sitting in the it 阅读全文
posted @ 2020-10-29 20:26 墨云黑 阅读(149) 评论(0) 推荐(0)
摘要:Summary Ranges (M) 题目 Given a sorted integer array without duplicates, return the summary of its ranges. Example 1: Input: [0,1,2,4,5,7] Output: ["0-> 阅读全文
posted @ 2020-10-28 15:24 墨云黑 阅读(127) 评论(0) 推荐(0)
摘要:Linked List Cycle II (M) 题目 Given a linked list, return the node where the cycle begins. If there is no cycle, return null. To represent a cycle in th 阅读全文
posted @ 2020-10-27 21:41 墨云黑 阅读(99) 评论(0) 推荐(0)
摘要:Champagne Tower (M) 题目 We stack glasses in a pyramid, where the first row has 1 glass, the second row has 2 glasses, and so on until the 100th row. Ea 阅读全文
posted @ 2020-10-27 09:14 墨云黑 阅读(131) 评论(0) 推荐(0)
摘要:Stone Game IV (H) 题目 Alice and Bob take turns playing a game, with Alice starting first. Initially, there are n stones in a pile. On each player's tur 阅读全文
posted @ 2020-10-25 22:52 墨云黑 阅读(201) 评论(0) 推荐(0)
摘要:Bag of Tokens (M) 题目 You have an initial power of P, an initial score of 0, and a bag of tokens where tokens[i] is the value of the ith token (0-index 阅读全文
posted @ 2020-10-25 11:00 墨云黑 阅读(137) 评论(0) 推荐(0)
摘要:132 Pattern (M) 题目 Given an array of n integers nums, a 132 pattern is a subsequence of three integers nums[i], nums[j] and nums[k] such that i < j < 阅读全文
posted @ 2020-10-24 11:05 墨云黑 阅读(75) 评论(0) 推荐(0)
摘要:Minimum Depth of Binary Tree (E) 题目 Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from 阅读全文
posted @ 2020-10-22 15:48 墨云黑 阅读(94) 评论(0) 推荐(0)
摘要:Asteroid Collision (M) 题目 We are given an array asteroids of integers representing asteroids in a row. For each asteroid, the absolute value represent 阅读全文
posted @ 2020-10-22 10:40 墨云黑 阅读(131) 评论(0) 推荐(0)
摘要:Clone Graph (M) 题目 Given a reference of a node in a connected undirected graph. Return a deep copy (clone) of the graph. Each node in the graph contai 阅读全文
posted @ 2020-10-20 19:53 墨云黑 阅读(104) 评论(0) 推荐(0)
摘要:Minimum Domino Rotations For Equal Row (M) 题目 In a row of dominoes, A[i] and B[i] represent the top and bottom halves of the ith domino. (A domino is 阅读全文
posted @ 2020-10-19 21:29 墨云黑 阅读(79) 评论(0) 推荐(0)
摘要:Best Time to Buy and Sell Stock IV (H) 题目 You are given an integer array prices where prices[i] is the price of a given stock on the ith day. Design a 阅读全文
posted @ 2020-10-18 21:28 墨云黑 阅读(112) 评论(0) 推荐(0)
摘要:Search a 2D Matrix (M) 题目 Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties: Integer 阅读全文
posted @ 2020-10-16 16:00 墨云黑 阅读(188) 评论(0) 推荐(0)
摘要:Rotate Array (E) 题目 Given an array, rotate the array to the right by k steps, where k is non-negative. Example 1: Input: [1,2,3,4,5,6,7] and k = 3 Out 阅读全文
posted @ 2020-10-15 15:56 墨云黑 阅读(104) 评论(0) 推荐(0)
摘要:Sort List (M) 题目 Sort a linked list in O(n log n) time using constant space complexity. Example 1: Input: 4->2->1->3 Output: 1->2->3->4 Example 2: Inp 阅读全文
posted @ 2020-10-13 17:20 墨云黑 阅读(159) 评论(0) 推荐(0)
摘要:Buddy Strings (E) 题目 Given two strings A and B of lowercase letters, return true if you can swap two letters in A so the result is equal to B, otherwi 阅读全文
posted @ 2020-10-12 15:59 墨云黑 阅读(227) 评论(0) 推荐(0)
摘要:Remove Duplicate Letters (M) 题目 Given a string s, remove duplicate letters so that every letter appears once and only once. You must make sure your re 阅读全文
posted @ 2020-10-11 17:02 墨云黑 阅读(166) 评论(0) 推荐(0)
摘要:Minimum Number of Arrows to Burst Balloons (M) 题目 There are some spherical balloons spread in two-dimensional space. For each balloon, provided input 阅读全文
posted @ 2020-10-10 16:19 墨云黑 阅读(164) 评论(0) 推荐(0)
摘要:Serialize and Deserialize BST (M) 题目 Serialization is converting a data structure or object into a sequence of bits so that it can be stored in a file 阅读全文
posted @ 2020-10-09 20:21 墨云黑 阅读(179) 评论(0) 推荐(0)
摘要:Binary Search (E) 题目 Given a sorted (in ascending order) integer array nums of n elements and a target value, write a function to search target in num 阅读全文
posted @ 2020-10-08 15:55 墨云黑 阅读(150) 评论(0) 推荐(0)
摘要:Insert into a Binary Search Tree (M) 题目 You are given the root node of a binary search tree (BST) and a value to insert into the tree. Return the root 阅读全文
posted @ 2020-10-06 16:19 墨云黑 阅读(169) 评论(0) 推荐(0)
摘要:Complement of Base 10 Integer (E) 题目 Every non-negative integer N has a binary representation. For example, 5 can be represented as "101" in binary, 1 阅读全文
posted @ 2020-10-05 20:18 墨云黑 阅读(185) 评论(0) 推荐(0)
摘要:Remove Covered Intervals (M) 题目 Given a list of intervals, remove all intervals that are covered by another interval in the list. Interval [a,b) is co 阅读全文
posted @ 2020-10-04 23:12 墨云黑 阅读(188) 评论(0) 推荐(0)
摘要:K-diff Pairs in an Array (M) 题目 Given an array of integers nums and an integer k, return the number of unique k-diff pairs in the array. A k-diff pair 阅读全文
posted @ 2020-10-03 16:10 墨云黑 阅读(150) 评论(0) 推荐(0)
摘要:Number of Recent Calls (E) 题目 You have a RecentCounter class which counts the number of recent requests within a certain time frame. Implement the Rec 阅读全文
posted @ 2020-10-01 15:30 墨云黑 阅读(220) 评论(0) 推荐(0)