Sum of Mutated Array Closest to Target
LeetCode problem #1300
Arrays
Master array manipulation with fundamental problems covering searching, sorting, and advanced algorithms.
Buy and Sell Stock (Maximum Profit)
Find the maximum profit from buying and selling stock with at most one transaction
Find Majority Element (Boyer-Moore Algorithm)
Find the majority element that appears more than n/2 times using Boyer-Moore majority vote algorithm
Find Missing Number (1 to n)
Find the missing number in an array containing n distinct numbers taken from 1, 2, 3, ..., n+1
Intersection of Two Arrays
Find the intersection of two arrays and return the result as an array.
Longest Consecutive Sequence
Find the length of the longest consecutive elements sequence in an unsorted array.
Maximum Subarray Sum (Kadane's Algorithm)
Find the contiguous subarray with maximum sum using Kadane's algorithm
Minimum Swaps to Sort Array
Find the minimum number of swaps required to sort an array.
Product of Array Except Self
Return an array where each element is the product of all elements except the element at that index.
Three Sum (Triplets that Sum to Zero)
Find all unique triplets in the array which gives the sum of zero