↓Skip to main content

Easy

LeetCode 4097: Minimum Value of Merged Integers
·1 min
LeetCode Easy Array String Simulation
LeetCode 4097 note: only merge the fixed pairs (0,1), (2,3), …, stepping by 2, not every adjacent pair
LeetCode 88: Merge Sorted Array
·3 mins
LeetCode Easy Two-Pointers Merge-Sort
LeetCode 88 note: merge from the back with O(1) extra space
LeetCode 21: Merge Two Sorted Lists
·3 mins
LeetCode Easy Linked-List Two-Pointers Merge-Sort
LeetCode 21 note: the dummy node, and why Python assignment is not a copy
LeetCode 3959: Check Good Integer
·1 min
LeetCode Easy Math Simulation
LeetCode 3959 note: accumulate the square sum minus the digit sum; each digit adds d² − d ≥ 0, so the gap never shrinks and you can return as soon as it reaches 50
LeetCode 3950: Exactly One Consecutive Set Bits Pair
·1 min
LeetCode Easy Bit-Manipulation
LeetCode 3950 note: each 1 in n & (n » 1) marks a pair of adjacent ones, so exactly one pair means it has a single 1
LeetCode 3931: Check Adjacent Digit Differences
·1 min
LeetCode Easy String
LeetCode 3931 note: check that every pair of adjacent digits differs by at most 2
LeetCode 121: Best Time To Buy And Sell Stock
·2 mins
LeetCode Easy Dynamic-Programming State-Machine
LeetCode note for Best Time To Buy And Sell Stock, rebuilt from the original learning note
LeetCode 3917: Count Indices With Opposite Parity
·1 min
LeetCode Easy Array
LeetCode 3917 note: scan right to left counting odds and evens seen; each position’s answer is the count of opposite parity to its right
LeetCode 3912: Valid Elements in an Array
·2 mins
LeetCode Easy Array
LeetCode 3912 note: greater than all on the left means greater than the prefix maximum, and likewise for the right with the suffix maximum; scan both ways and output in original order
LeetCode 746: Min Cost Climbing Stairs
·2 mins
LeetCode Easy Dynamic-Programming
LeetCode note for Min Cost Climbing Stairs, rebuilt from the original learning note
LeetCode 3908: Valid Digit Number
·1 min
LeetCode Easy Math
LeetCode 3908 note: convert to a string and check that it contains x but does not start with x
LeetCode 70: Climbing Stairs
·2 mins
LeetCode Easy Dynamic-Programming
LeetCode note for Climbing Stairs, rebuilt from the original learning note