随笔分类 - LeetCode
摘要:Meeting Rooms III You are given an integer . There are rooms numbered from to . You are given a 2D integer array meetings where meet
阅读全文
摘要:Number of Ways to Reach a Position After Exactly k Steps You are given two positive integers startPos and endPos . Initially, you are standing at posi
阅读全文
摘要:Maximum Number of Robots Within Budget You have robots. You are given two 0-indexed integer arrays, chargeTimes and runningCosts , both of length
阅读全文
摘要:Subarray With Elements Greater Than Varying Threshold You are given an integer array and an integer . Find any subarray of of
阅读全文
摘要:Build a Matrix With Conditions You are given a positive integer . You are also given: a 2D integer array of size where $rowCond
阅读全文
摘要:Largest Palindromic Number You are given a string consisting of digits only. Return the largest palindromic integer (in the form of a string) th
阅读全文
摘要:Maximum Segment Sum After Removals You are given two 0-indexed integer arrays and , both of length . For the query,
阅读全文
摘要:Time Needed to Rearrange a Binary String You are given a binary string . In one second, all occurrences of 01 are simultaneously replaced with 10 .
阅读全文
摘要:Count Special Integers We call a positive integer special if all of its digits are distinct. Given a positive integer , return the number of specia
阅读全文
摘要:Construct Smallest Number From DI String You are given a 0-indexed string pattern of length n consisting of the characters 'I' meaning increasing and
阅读全文
摘要:Max Chunks To Make Sorted II You are given an integer array arr. We split arr into some number of chunks (i.e., partitions), and individually sort eac
阅读全文