GL
GrindLens
PatternsSheetsPricingQuestions
  1. Home
  2. /Patterns
  3. /Greedy Single-Pass Decision
←All Patterns
GreedyEvidence Contributing

Greedy Single-Pass Decision

Make a locally optimal choice while scanning once left to right, where the specific decision rule is simple enough not to warrant its own named pattern.

Practice Problems: 8
Difficulty: 0 Easy·7 Medium·1 Hard

Core technique

Review the technique, then try the mapped problems below. The right approach depends on each problem's constraints.

  • Core Strategy: Make a locally optimal choice while scanning once left to right, where the specific decision rule is simple enough not to warrant its own named pattern.

Canonical Practice Problems

8 problems
1.Best Time to Buy and Sell Stock IIMedium
Solve on LeetCode↗
2.Gas StationMedium
Solve on LeetCode↗
3.H-IndexMedium
Solve on LeetCode↗
4.Hand of StraightsMedium
Solve on LeetCode↗
5.Merge Triplets to Form Target TripletMedium
Solve on LeetCode↗
6.Partition LabelsMedium
Solve on LeetCode↗
7.Task SchedulerMedium
Solve on LeetCode↗
8.IPOHard
Solve on LeetCode↗

Curated Sheets Containing This Pattern

NeetCode All

7 problems

→

NeetCode 150

5 problems

→

LeetCode Top Interview 150

4 problems

→

Striver A2Z

3 problems

→

Related Algorithmic Patterns

Heap2 shared

Heap for Top-K / Kth Element

Hashing1 shared

Hashmap Frequency / State Counting

Greedy

Boyer-Moore Voting Algorithm

Greedy

Greedy Farthest-Reach Tracking

Greedy

Greedy Interval Scheduling

GL
GrindLens

Precision pattern analytics and curated sheet tracking for algorithmic coding interview preparation.

Quick lookup:⌘Kor/

Platform

  • Patterns→
  • Sheets→
  • Pricing→

Community

  • Feedback
  • Report a bug
  • X
  • LinkedIn

© 2026 GrindLens. LeetCode is a trademark of LeetCode. GrindLens is an independent analytics platform and is not affiliated with or endorsed by LeetCode.

Terms of ServicePrivacy Policy