↓Skip to main content

Easy

LeetCode 3750: Minimum Number of Flips to Reverse Binary String
·2 mins
LeetCode Easy Two-Pointers Bit-Manipulation String
LeetCode 3750 note: compare the binary string with its reverse bit by bit; the number of mismatches is the answer
LeetCode 3731: Find Missing Elements
·1 min
LeetCode Easy Hash-Table Sorting Array
LeetCode 3731 note: the minimum and maximum are still present, so check every integer in between against a set
LeetCode 3712: Sum of Elements With Frequency Divisible by K
·1 min
LeetCode Easy Hash-Table Counting Array
LeetCode 3712 note: count each value, and for counts divisible by k add value × count
LeetCode 3707: Equal Score Substrings
·2 mins
LeetCode Easy Prefix-Sum String
LeetCode 3707 note: accumulate the left score while scanning, with the right side as total minus left; scores are alphabet positions 1 to 26, not ord
LeetCode 3701: Compute Alternating Sum
·1 min
LeetCode Easy Array Simulation
LeetCode 3701 note: add even indices and subtract odd ones; with slices, sum(nums[::2]) - sum(nums[1::2])
LeetCode 3697: Compute Decimal Representation
·1 min
LeetCode Easy Math Array
LeetCode 3697 note: each non-zero digit times its place value is one component; output them from the highest place down
LeetCode 3688: Bitwise OR of Even Numbers in an Array
·1 min
LeetCode Easy Bit-Manipulation Array Simulation
LeetCode 3688 note: OR only the even numbers; the starting value 0 is also the answer when there are none
LeetCode 2264: Largest 3-Same-Digit Number in String
·1 min
LeetCode Easy String
LeetCode 2264 note: there are only ten candidates, “000” to “999”, so check from “999” down whether each appears
LeetCode 3643: Flip Square Submatrix Vertically
·2 mins
LeetCode Easy Two-Pointers Matrix
LeetCode 3643 note: flip only the submatrix rows, swapping the slices of rows x + i and x + k - 1 - i
LeetCode 20: Valid Parentheses
·2 mins
LeetCode Daily Easy String Stack Data-Structures Parentheses Validation
Solving the Valid Parentheses problem using stack-based approach
LeetCode 496: Next Greater Element I (Monotonic Stack)
·2 mins
LeetCode Daily Easy Array Stack Monotonic-Stack Hash-Map Next-Greater-Element
Monotonic decreasing stack over nums2 to build next-greater map; answer queries for nums1.
LeetCode 1071: Greatest Common Divisor of Strings
·2 mins
LeetCode Daily Easy String Gcd Math
LeetCode Problem Solving