All problems
› Greedy problems
Greedy problems
50 Greedy DSA practice problems on CampusCode, each with statement, examples and constraints.
344. Point Arbit Pointer to Greatest Value Right Side Node
Easy
Linked List
411. Remove K Digits to Get Smallest Number (LL + Stack)
Hard
Linked List
414. Partition Linked List into K Consecutive Groups
Hard
Linked List
429. Binary Search on Answer — Minimum Pages
Easy
Binary Search
468. Check if Array Can Be Made Strictly Increasing by Removing One Element
Easy
Binary Search
475. Magnetic Force Between Two Balls (Introduction)
Easy
Binary Search
485. Aggressive Cows (Maximum Minimum Distance)
Medium
Binary Search
488. Magnetic Force Between Two Balls
Medium
Binary Search
489. Gas Station — Minimum Stations to Add
Medium
Binary Search
495. EKO — Cutting Logs (Maximum Sawblade Height)
Medium
Binary Search
499. Maximize the Minimum After K Increments
Medium
Binary Search
512. Heaters — Find the Minimum Radius
Medium
Binary Search
521. Maximum Number of Events That Can Be Attended
Medium
Binary Search
523. Course Schedule III (Greedy + Heap)
Medium
Binary Search
545. Minimum Cost to Hire K Workers (Scaled)
Hard
Binary Search
550. Maximize the Minimum Powered City
Hard
Binary Search
553. Minimum Number of Refueling Stops
Hard
Binary Search
555. Minimum Operations to Make Median of Array Equal to Target
Hard
Binary Search
559. Guess the Word (Deterministic Strategy)
Hard
Binary Search
560. Minimize Deviation in Array
Hard
Binary Search
562. Maximum Score of a Good Subarray
Hard
Binary Search
563. K-th Lexicographically Smallest Integer in Range
Hard
Binary Search
597. Balanced Brackets with Wildcard
Easy
Stack
599. Task Scheduler — Simple Version
Easy
Stack
605. Remove K Digits to Get Smallest Number
Easy
Stack
615. Remove Duplicate Letters
Medium
Stack
622. Task Scheduler (Greedy + Queue)
Medium
Stack
625. Dota2 Senate
Medium
Stack
635. Minimum Add to Make Parentheses Valid
Medium
Stack
636. Minimum Insertions to Balance Parentheses
Medium
Stack
665. Minimum Swaps to Make String Balanced
Hard
Stack
667. Find the Most Competitive Subsequence
Hard
Stack
677. Maximal Score After Applying K Operations
Hard
Stack
682. Maximum Points in an Archery Competition
Hard
Stack
946. Kth Smallest in Lexicographic Order
Hard
Trees
964. Minimum Dominating Set on a Tree
Hard
Trees
1056. Minimum Jumps to Reach End (Jump Game BFS)
Medium
Graphs
1113. Couples Holding Hands — Minimum Swaps
Hard
Graphs
1122. Jump Game I — Can Reach End
Easy
Dynamic Programming
1123. Jump Game II — Minimum Jumps
Easy
Dynamic Programming
1187. Maximum Length of Pair Chain
Medium
Dynamic Programming
1333. Maximum AND Value of a Pair in Array
Medium
Bit Manipulation
1334. Maximum XOR of Two Numbers in Array (Trie)
Medium
Bit Manipulation
1341. Minimum Number of Flips to Make OR of Array K
Medium
Bit Manipulation
1342. Minimum Flips to Make a OR b Equal to c
Medium
Bit Manipulation
1363. Minimum Number of Operations to Make XOR Zero
Medium
Bit Manipulation
1369. Integer Replacement — Min Steps Using Bits
Medium
Bit Manipulation
1386. Maximum XOR of Two Numbers in Array
Hard
Bit Manipulation
1399. Maximum AND of Two Numbers After One Swap
Hard
Bit Manipulation
1400. Find the Largest Number in Range with Max Set Bits
Hard
Bit Manipulation