LeetCode DynamicSlidingWindowCountShortest

an archive of posts in this category

Backend Base

           Java8Stream流递归树遍历
           序列化与反序列化
           注解与反射

Backend ElasticSearch

           ElasticSearch部署
           ElasticSearch基础
           ElasticSearch概念

Backend Collection

           ConcurrentHashMap
           HashMap死循环原因
           HashMap
           ArrayList与LinkedList

Backend MYSQL

           MYSQL排查问题
           读写分离
           分库分表做到永不迁移数据和避免热点
           分库分表实战
           分库分表
           MYSQL的主从复制
           MVCC多版本并发控制
           MySQL优化建议
           MySQL查出重复的记录
           MySQL的七种JOIN
           MySQL如何被执行的
           MYSQL常见问题
           MYSQL基础

Backend Redis

           Redis工具类
           跳表
           布隆过滤器的实现
           分布式锁对比
           Redis实现分布式锁与Redisson
           Redis实现的分布式锁2
           Redis实现的分布式锁
           Redis哈希槽实战
           RedisCluster
           Redis集群解决方案
           Redis主从架构
           Redis如何做到高可用
           Redis的基本数据类型
           Redis基础

Backend Thread

           CountDownLatch
           AQS源码分析
           AbstractQueuedSynchronizer
           ReentrantLock
           Synchronized
           Volatile
           ThreadLocal
           锁的分类
           线程池业务中的实践
           线程池

Backend Computer

           IO模型
           为什么TCP建立连接需要三次握手
           TCP的三次握手与四次挥手
           计算机网络基础

Backend JVM

           JVM调优工具与调优实战
           Java线上问题排查思路与工具
           JVM之类加载与双亲委派
           JVM基础

Interview Pic

           Solving problems from scratch
           Architecture Design
           Final
           Design Pattern
           Distributed
           MQ
           Spring
           Computer
           Redis
           Thread
           Collection
           Base
           MYSQL
           Interview

Backend Spring

           搭建SpringCloud项目
           Spring与Redis通信设计结构图
           Springboot自动装配原理
           SpringBoot
           Spring循环依赖
           Spring的生命周期
           Spring手写实现AOP
           Spring的AOP
           Spring的IOC启动过程
           Spring基础

Work

           JDBCBatchUpdate
           When to use the different log levels
           输入URL页面没出现如何排查
           JWT基础
           表驱动法
           本地jar引入到maven方式
           Windows10关闭端口占用进程
           js上精度丢失解决方案
           Linux环境下安装svn
           如何高效的使用 Git

Backend MQ

           消息的延时以及失效问题
           如何处理消息丢失的问题
           如何保证消息队列的高可用
           消息的幂等性
           消息的顺序性
           MQ基础

Design Patterns

           里氏替换原则
           迪米特法则
           接口分离原则
           依赖倒置原则
           单一原则
           开闭原则
           面向对象设计原则
           单例模式
           适配器模式
           建造者模式
           抽象工厂模式
           简单工厂模式
           工厂方法模式
           创建型设计模式
           UML类图
           面向对象的设计过程

Linux

           LinuxDay3
           LinuxDay2
           LinuxDay1

Python

           PythonDay1

分布式

           分布式系統接口如何避免表单的重复提交
           Zookeeper实现分布式锁
           TCC实例
           基于rocketmq的分布式事务
           分布式事务解决方案Part2
           分布式事务解决方案Part1

Data Structure

           Sliding Window Techniques
           Floyd's Algorithm for Finding Duplicate Number
           SORT
           Levenshtein Distance Algorithm
           Mastering Coin Change with Dynamic Programming
           Union-Find
           Prefix Sum
           Morris
           Reverse LinkedList
           LRU LinkedList
           Binary Search Universal Formula

System Design Other

           如何写一个并行调用模版
           架构设计之徽服务拆分
           如何设计好一个接口
           手写LRU
           如何实现订单主动过期释放
           阿里云短信验证服务
           日志的使用
           如何高效对接第三方支付
           如何设计一个高并发场景
           图片验证码功能
           xxljob分布式定时任务框架与系统的接入
           如何设计一个站内消息系统?
           如何设计一个秒杀系统?
           如何设计一个短链系统?
           如何解决网站大文件上传问题?
           如何统计网站UV?

Interview

           System Design学习
           System Design面试建议

System Design

           Designing a Tiny URL
           What happens when you type URL in your browser

Algorithm Array

           Count Squares
           Zigzag Traverse
           Min Rewards
           Largest Range
           Subarray Sort
           Four Number Sum
           Best Seat
           Missing Numbers
           Zero Sum Subarray
           Merge Overlapping Intervals
           First Duplicate Value
           Array Of Products
           Longest Peak
           Spiral Traverse
           Monotonic Array
           Move Element To End
           SmallestDifference
           Three Number Sum
           Non-Constructible Change
           Tournament Winner
           Sorted Squared Array
           Validate Subsequence
           Two Number Sum-Easy

Algorithm BST

           Validate Three Nodes
           Same BSTs
           Reconstruct BST
           Find Kth Largest Value In BST
           Min Height BST
           BST Traversal
           Validate Binary Search Tree
           BST Construction
           Find Closest Value In BST

Algorithm Binary Trees

           Find Nodes Distance K
           Max Path Sum In Binary Tree
           Split Binary Tree
           Symmetrical Tree
           Merge Binary Trees
           Height Balanced Binary Tree
           Find Successor
           Binary Tree Diameter
           Invert Binary Tree
           Evaluate Expression Tree
           Node Depths
           Branch Sums

Algorithm Graphs

           Boggle Board
           Two-Colorable
           Minimum Passes Of Matrix
           Cycle In Graph
           Remove Islands
           Youngest Common Ancestor
           River Sizes
           Breadth-first Search
           Single Cycle Check
           Depth-first Search

Algorithm Sorting

           Radix Sort
           Heap Sort
           Quick Sort
           Three Number Sort
           Selection Sort
           Insertion Sort
           Bubble Sort

Algorithm Greedy

           Valid Starting City
           Task Assignment
           Tandem Bicycle
           Class Photos
           Minimum Waiting Time

Algorithm String

           Pattern Matcher
           Underscorify Substring
           Longest Substring Without Duplication
           One Edit Distance
           Minimum Characters For Words
           Reverse Words In String
           Valid IP Addresses
           Group Anagrams
           Longest Palindromic Substring
           Semordnilap
           First Non-Repeating Character
           Generate Document
           Run-Length Encoding
           Common Characters
           Caesar Cipher Encryptor
           Palindrome Check

Algorithm Stack

           Reverse Polish Notation
           Next Greater Element
           Sort Stack
           Sunset Views
           Balanced Brackets
           Min Max Stack Construction

Algorithm Searching

           Index Equals Value
           Quick Select
           Search For Range
           Shifted Binary Search
           Search In Sorted Matrix
           Find Three Largest Numbers
           Binary Search

Algorithm LinkedLists

           Linked List Palindrome
           Zip Linked List
           Rearrange Linked List
           LRU Cache
           Shift Linked List
           Merge Linked Lists
           Reverse Linked List
           Find Loop
           Merging Linked Lists
           Sum of Linked Lists
           Remove Kth Node From End
           Middle of the Linked List
           Remove Duplicates From Linked List

Algorithm Tries

           Multi String Search
           Suffix Trie Construction

Algorithm Famous

           Prim’s Algorithm
           Kruskal's Algorithm
           Topological Sort
           Dijkstra's Algorithm
           Union Find
           Stable Internships
           Kadane's Algorithm

Algorithm Dynamic

           Number Of Ways To Traverse Graph
           Levenshtein Distance
           Min Number Of Coins For Change
           Number Of Ways To Make Change
           Maximum sum of Non-adjacent nodes

LeetCode Binary Search

           81. Search in Rotated Sorted Array II
           1539. Kth Missing Positive Number
           278. First Bad Version
           287. Find the Duplicate Number
           786. K-th Smallest Prime Fraction
           719. Find K-th Smallest Pair Distance
           668. Kth Smallest Number in Multiplication Table
           378. Kth Smallest Element in a Sorted Matrix
           4. Median of Two Sorted Arrays
           1011. Capacity To Ship Packages Within D Days
           875. Koko Eating Bananas
           240. Search a 2D Matrix II
           74. Search a 2D Matrix
           69. Sqrt(x)
           852. Peak Index in a Mountain Array
           162.Find Peak Element
           154.Find Minimum in Rotated Sorted Array II
           153.Find Minimum in Rotated Sorted Array
           33.Search in Rotated Sorted Array
           981.Time Based Key-Value Store
           34.Search Insert Position
           704.Binary Search
           35.Search Insert

LeetCode Array

           1749. Maximum Absolute Sum of Any Subarray
           1472. Design Browser History
           624. Maximum Distance in Arrays
           1287. Element Appearing More Than 25% In Sorted Array
           1299. Replace Elements with Greatest Element on Right Side
           1706. Where Will the Ball Fall
           80. Remove Duplicates from Sorted Array II
           2364. Count Number of Bad Pairs
           59. Spiral Matrix II
           922. Sort Array By Parity II
           1800. Maximum Ascending Subarray Sum
           3105. Longest Strictly Increasing or Strictly Decreasing Subarray
           598. Range Addition II
           1752. Check if Array Is Sorted and Rotated
           3151. Special Array I
           2661. First Completely Painted Row or Column
           2239. Find Closest Number to Zero
           916. Word Subsets
           3042. Count Prefix and Suffix Pairs I
           1408. String Matching in an Array
           1769. Minimum Number of Operations to Move All Balls to Each Box
           2274. Maximum Consecutive Floors Without Special Floors
           2381. Shifting Letters II
           2270. Number of Ways to Split Array
           1366. Rank Teams by Votes
           3046. Split the Array
           3159. Find Occurrences of an Element in an Array
           1014. Best Sightseeing Pair
           2545. Sort the Students by Their Kth Score
           769. Max Chunks To Make Sorted
           3285. Find Indices of Stable Mountains
           885. Spiral Matrix III
           1338. Reduce Array Size to The Half
           670. Maximum Swap
           2593. Find Score of an Array After Marking All Elements
           3264. Final Array State After K Multiplication Operations I
           65. Valid Number
           2717. Semi-Ordered Permutation
           3152. Special Array II
           66. Plus One
           498. Diagonal Traverse
           2022. Convert 1D Array Into 2D Array
           766. Toeplitz Matrix
           1380. Lucky Numbers in a Matrix
           31.Next Permutation
           973.K Closest Points to Origin
           453.Minimum Moves to Equal Array Elements
           215.Kth Largest Element in an Array
           349.Intersection of Two Arrays
           36.Valid Sudoku
           242.Valid Anagram
           347.Top K Frequent Elements
           238.Product of Array Except Self
           128.Longest Consecutive Sequence
           659.Encode and Decode Strings
           2357.Make Array Zero by Subtracting Equal Amounts
           217.Contains Duplicate

LeetCode SingleSeqTwoPointersInward

           1498. Number of Subsequences That Satisfy the Given Sum Condition
           1616. Split Two Strings to Make Palindrome
           948. Bag of Tokens
           923. 3Sum With Multiplicity
           611. Valid Triangle Number
           LCP 28. Procurement Plan
           18. 4Sum
           633. Sum of Square Numbers
           2824. Count Pairs Whose Sum is Less than Target
           1471. The k Strongest Values in an Array
           2105. Watering Plants II
           344. Reverse String
           1750. Minimum Length of String After Deleting Similar Ends
           658. Find K Closest Elements
           16. 3Sum Closest
           42.Trapping Rain Water
           15.3Sum
           977. Squares of a Sorted Array
           167. Two Sum II - Input Array Is Sorted
           11.Container With Most Water
           125. Valid Palindrome

LeetCode HashTable

           350. Intersection of Two Arrays II
           3083. Existence of a Substring in a String and Its Reverse
           266. Palindrome Permutation
           447. Number of Boomerangs
           1010. Pairs of Songs With Total Durations Divisible by 60
           523. Continuous Subarray Sum
           791. Custom Sort String
           525. Contiguous Array
           290.Word Pattern
           953.Verifying an Alien Dictionary
           169.Majority Element
           260.Single Number III
           41.First Missing Positive
           49.Group Anagrams
           560.Subarray Sum Equals K

LeetCode LinkedList

           2. Add Two Numbers
           138.Copy List with Random Pointer
           19.Remove Nth Node From End of List
           143. Reorder List
           141.Linked List Cycle
           21.Merging Linked Lists
           206.Reverse Linked List

LeetCode Stack

           2375. Construct Smallest Number From DI String
           1475. Final Prices With a Special Discount in a Shop
           224. Basic Calculator
           636. Exclusive Time of Functions
           394. Decode String
           1209. Remove All Adjacent Duplicates in String II
           71. Simplify Path
           1047. Remove All Adjacent Duplicates In String
           716.Max Stack
           1249.Minimum Remove to Make Valid Parentheses
           1762.Buildings With an Ocean View LevelI
           227.Basic Calculator II
           735.Asteroid Collision
           853.Car Fleet
           739.Daily Temperatures
           22.Generate Parenthesesn
           150.Evaluate Reverse Polish Notation
           20. Valid Parentheses

LeetCode SlideWindow

           219. Contains Duplicate II
           3298. Count Substrings That Can Be Rearranged to Contain a String II
           220. Contains Duplicate III
           1984. Minimum Difference Between Highest and Lowest of K Scores
           3297. Count Substrings That Can Be Rearranged to Contain a String I
           2269. Find the K-Beauty of a Number
           (Review)30. Substring with Concatenation of All Words
           567.Permutation in String
           438. Find All Anagrams in a String
           1888. Minimum Number of Flips to Make the Binary String Alternating
           2653. Sliding Subarray Beauty
           2134. Minimum Swaps to Group All 1's Together II
           1297. Maximum Number of Occurrences of a Substring
           1652. Defuse the Bomb
           1423. Maximum Points You Can Obtain from Cards
           2461. Maximum Sum of Distinct Subarrays With Length K
           2841. Maximum Sum of Almost Unique Subarray
           1461. Check If a String Contains All Binary Codes of Size K
           1052. Grumpy Bookstore Owner
           2379. Minimum Recolors to Get K Consecutive Black Blocks
           2090. K Radius Subarray Averages
           1343. Number of Sub-arrays of Size K and Average Greater than or Equal to Threshold
           643. Maximum Average Subarray I
           1456. Maximum Number of Vowels in a Substring of Given Length
           122. Best Time to Buy and Sell Stock II
           76. Minimum Window Substring
           424. Longest Repeating Character Replacement
           121. Best Time to Buy and Sell Stock

LeetCode Trees

           732. My Calendar III
           731. My Calendar II
           729. My Calendar I
           1367. Linked List in Binary Tree
           199.Binary Tree Right Side View
           339.Nested List Weight Sum
           236. Lowest Common Ancestor of a Binary Tree
           297.Serialize and Deserialize Binary Tree
           124.Binary Tree Maximum Path Sum
           105.Construct Binary Tree from Preorder and Inorder Traversal
           98.Validate Binary Search Tree
           102.Binary Tree Level Order Traversal
           235.Lowest Common Ancestor of a Binary Search Tree
           572.Subtree of Another Tree
           230.Kth Smallest Element in a BST
           104.Maximum Depth of Binary Tree
           226.Invert Binary Tree

LeetCode Tries

           212.Word Search II
           211.Design Add and Search Words Data Structure
           208.Implement Trie(Prefix Tree)

LeetCode MathGeometry

           3138. Minimum Length of Anagram Concatenation
           7. Reverse Integer
           50. Pow(x, n)
           415. Add Strings
           73.Set Matrix Zeroes
           54.Spiral Matrix
           48.Rotate Image

LeetCode BitManipulation

           371.Sum of Two Integers
           268.Missing Number
           190.Reverse Bits
           338.Counting Bits
           191.Number of 1 Bits

LeetCode Greedy

           45. Jump Game II
           2412. Minimum Money Required Before Transactions
           3066. Minimum Operations to Exceed Threshold Value II
           2241. Design an ATM Machine
           2182. Construct String With Repeat Limit
           1792. Maximum Average Pass Ratio
           2558. Take Gifts From the Richest Pile
           2931. Maximum Spending After Buying Items
           13. Roman to Integer
           55.Jump Game
           53.Maximum Subarray

LeetCode Intervals

           253.Meeting Rooms II
           435.Non-overlapping Intervals
           56.Merge Intervals
           57.Insert Interval
           252.Meeting Rooms

LeetCode Backtracking

           40. Combination Sum II
           52. N-Queens II
           51. N-Queens
           386.Lexicographical Numbers
           79.Word Search
           39.Combination Sum

LeetCode Graphs

           261.Graph Valid Tree
           207.Course Schedule
           417.Pacific Atlantic Water Flow
           133.Clone Graph
           200.Number of Islands

LeetCode Dynamic Programming

           1462. Course Schedule IV
           (Review) 2944. Minimum Number of Coins for Fruits
           2266. Count Number of Texts
           1422. Maximum Score After Splitting a String
           2415. Reverse Odd Levels of Binary Tree
           935. Knight Dialer
           5.Longest Palindromic Substring
           72.Edit Distance
           377.Combination Sum IV
           1143.Longest Common Subsequence
           62.Unique Paths
           300.Longest Increasing Subsequence
           139.Word Break
           152.Maximum Product Subarray
           322.Coin Change
           91.Decode Ways
           647.Palindromic Substrings
           198.House Robber II
           198.House Robber
           70.Climbing Stairs

LeetCode TwoPointers

           541. Reverse String II
           1930. Unique Length-3 Palindromic Subsequences
           1847. Closest Room
           9. Palindrome Number
           1768. Merge Strings Alternately
           1868. Product of Two Run-Length Encoded Arrays
           986. Interval List Intersections
           443. String Compression
           26. Remove Duplicates from Sorted Array
           88.Merge Sorted Array
           680.Valid Palindrome II
           528.Random Pick with Weight
           75.Sort Colors
           283.Move Zeroes
           408.Valid Word Abbreviation

Todo List

           Todo List

LeetCode Math

           1524. Number of Sub-arrays With Odd Sum
           1352. Product of the Last K Numbers
           1742. Maximum Number of Balls in a Box
           119. Pascal's Triangle II
           1267. Count Servers that Communicate
           1561. Maximum Number of Coins You Can Get
           2017. Grid Game
           2683. Neighboring Bitwise XOR
           2425. Bitwise XOR of All Pairings
           2429. Minimize XOR
           2657. Find the Prefix Common Array of Two Arrays
           3223. Minimum Length of String After Operations
           2275. Largest Combination With Bitwise AND Greater Than Zero
           3270. Find the Key of the Numbers
           2559. Count Vowel Strings in Ranges
           3280. Convert Date to Binary
           1812. Determine Color of a Chessboard Square
           999. Available Captures for Rook
           3001. Minimum Moves to Capture The Queen
           3274. Check if Two Chessboard Squares Have the Same Color

LeetCode DynamicSlidingWindowCountShortest

           LCP 68. Beautiful Bouquet
           2302. Count Subarrays With Score Less Than K
           3258. Count Substrings That Satisfy K-Constraint I
           713. Subarray Product Less Than K
           2762. Continuous Subarrays

LeetCode DFS

           2658. Maximum Number of Fish in a Grid
           802. Find Eventual Safe States
           1387. Sort Integers by The Power Value
           2872. Maximum Number of K-Divisible Components

LeetCode Heap

           1705. Maximum Number of Eaten Apples

LeetCode DynamicSlidingWindowMax

           (Review)1438. Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit
           2781. Length of the Longest Valid Substring
           2009. Minimum Number of Operations to Make Array Continuous
           2555. Maximize Win From Two Segments
           2271. Maximum White Tiles Covered by a Carpet
           2831. Find the Longest Equal Subarray
           2516. Take K of Each Character From Left and Right
           1838. Frequency of the Most Frequent Element
           1658. Minimum Operations to Reduce X to Zero
           1004. Max Consecutive Ones III
           2779. Maximum Beauty of an Array After Applying Operation
           2024. Maximize the Confusion of an Exam
           (Review)3097. Shortest Subarray With OR at Least K II
           2958. Length of Longest Subarray With at Most K Frequency
           3095. Shortest Subarray With OR at Least K I
           1695. Maximum Erasure Value
           904. Fruit Into Baskets
           1208. Get Equal Substrings Within Budget
           2730. Find the Longest Semi-Repetitive Substring
           1493. Longest Subarray of 1's After Deleting One Element
           3090. Maximum Length Substring With Two Occurrences
           3. Longest Substring Without Repeating Characters

LeetCode DynamicSlidingWindowMin

           1234. Replace the Substring for Balanced String
           (Review)2904. Shortest and Lexicographically Smallest Beautiful String
           209. Minimum Size Subarray Sum

LeetCode DynamicSlidingWindowCountExact

           1248. Count Number of Nice Subarrays
           930. Binary Subarrays With Sum