Greedy

Sum of Mutated Array Closest to Target

LeetCode problem #1300

Buy and Sell Stock (Maximum Profit)

Find the maximum profit from buying and selling stock with at most one transaction

Coin Change (Minimum Coins)

Find the minimum number of coins needed to make a given amount

Connect Ropes with Minimum Cost

Connect ropes with minimum cost using greedy approach with heap

Furthest Building You Can Reach

Find furthest building reachable using optimal allocation of bricks and ladders

Maximize Sum After K Negations

Maximize array sum by flipping signs of k elements using greedy heap approach

Maximum Subarray Sum (Kadane's Algorithm)

Find the contiguous subarray with maximum sum using Kadane's algorithm

Meeting Rooms II

Find minimum number of meeting rooms required using heap

Minimum Insertions to Balance Parentheses

Find minimum insertions needed to balance parentheses string

Minimum Number of Refueling Stops

Find minimum refueling stops to reach target using greedy max-heap approach

Minimum Spanning Tree

Find the minimum spanning tree of a weighted undirected graph using Kruskal's and Prim's algorithms

Reduce Array Size to Half

Find minimum removals to reduce array size by half using greedy heap approach

Remove K Digits

Remove k digits from a number to make it as small as possible

Reorganize String

Reorganize string so no two adjacent characters are the same

Task Scheduler

Schedule tasks with cooling period using greedy approach with heap