随笔分类 -  LeetCode

上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 20 下一页
摘要: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 墨云黑 阅读(158) 评论(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 墨云黑 阅读(163) 评论(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 墨云黑 阅读(187) 评论(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 墨云黑 阅读(149) 评论(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)
摘要:Word Break (M) 题目 Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a sp 阅读全文
posted @ 2020-09-29 17:08 墨云黑 阅读(213) 评论(0) 推荐(0)
摘要:Subarray Product Less Than K (M) 题目 Your are given an array of positive integers nums. Count and print the number of (contiguous) subarrays where the 阅读全文
posted @ 2020-09-28 22:55 墨云黑 阅读(192) 评论(0) 推荐(0)
摘要:Evaluate Division (M) 题目 You are given equations in the format A / B = k, where A and B are variables represented as strings, and k is a real number ( 阅读全文
posted @ 2020-09-28 13:13 墨云黑 阅读(95) 评论(0) 推荐(0)
摘要:Teemo Attacking (M) 题目 In LOL world, there is a hero called Teemo and his attacking can make his enemy Ashe be in poisoned condition. Now, given the T 阅读全文
posted @ 2020-09-26 23:50 墨云黑 阅读(175) 评论(0) 推荐(0)
摘要:Largest Number (M) 题目 Given a list of non negative integers, arrange them such that they form the largest number. Example 1: Input: [10,2] Output: "21 阅读全文
posted @ 2020-09-25 23:25 墨云黑 阅读(168) 评论(0) 推荐(0)
摘要:Find the Difference (E) 题目 Given two strings s and t which consist of only lowercase letters. String t is generated by random shuffling string s and t 阅读全文
posted @ 2020-09-24 20:55 墨云黑 阅读(178) 评论(0) 推荐(0)
摘要:Gas Station (M) 题目 There are N gas stations along a circular route, where the amount of gas at station i is gas[i]. You have a car with an unlimited g 阅读全文
posted @ 2020-09-24 10:21 墨云黑 阅读(197) 评论(0) 推荐(0)
摘要:Majority Element II (M) 题目 Given an integer array of size n, find all elements that appear more than ⌊ n/3 ⌋ times. Note: The algorithm should run in 阅读全文
posted @ 2020-09-22 21:45 墨云黑 阅读(128) 评论(0) 推荐(0)

上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 20 下一页