0300-Longest-Increasing-Subsequence 0301-Remove-Invalid-Parentheses 0303-Range-Sum-Query-Immutable 0307-Range-Sum-Query-Mutable 0308-Range-Sum-Query-2D-Mutable 0309-Best-Time-to-Buy-and-Sell-Stock-with-Cooldown
2526-longest-increasing-subsequence-ii 2539-minimum-number-of-operations-to-make-arrays-similar 2545-height-of-binary-tree-after-subtree-removal-queries 2549-next-greater-element-iv 2551-apply-operations-to-an-array 2552-maximum-sum-of-distinct-subarrays-with-length-k 2553-total-cost-to-hire-k-...
Count number of occurrences in a sorted array using binary search We can also use a binary search. Using binary search we need o find two things, one is the first occurrence of the element and another is the last occurrence of the element. ...
828. Count Unique Characters of All Substrings of a Given String # 题目 # Let’s define a function countUniqueChars(s) that returns the number of unique characters on s, for example if s = "LEETCODE" then "L", "T","C","O","D" are the unique characters
面试官表示ok,但你不要写代码,先写fomula。我又沟通了一会儿什么是fomula,最后搞明白写了一个query(i,j)=preSum[j+1]-preSum[i];面试管表示满意,问我时间空间复杂度。
B_Longest_Divisors_Interval.cpp B_Lost_Numbers.cpp B_Lunatic_Never_Content.cpp B_LuoTianyi_and_the_Table.cpp B_MKnez_s_ConstructiveForces_Task.cpp B_Magical_Calendar.cpp B_Magical_Creatures.cpp B_Make_Array_Good.cpp B_Make_Array_Good.exe B_Make_It_Ugly.cpp B_Make_Majority.cpp B_Mashm...
B_Longest_Divisors_Interval.cpp B_Lost_Numbers.cpp B_Lunatic_Never_Content.cpp B_LuoTianyi_and_the_Table.cpp B_MKnez_s_ConstructiveForces_Task.cpp B_Magical_Calendar.cpp B_Magical_Creatures.cpp B_Make_Array_Good.cpp B_Make_Array_Good.exe B_Make_It_Ugly.cpp B_Make_Majority.cpp B_Mashm...