# Intervals and sorting — DSA Interview Patterns

Source: https://www.geekswithgeeks.com/en/dsa-interview-patterns/dsa-interview-patterns-10

> Use Intervals and sorting to make a clear, evidence-based decision.

## Understand Intervals and sorting

Start by naming the decision behind **Intervals and sorting**. A strong answer explains the goal, the constraints, and the evidence you would use before acting. Do not treat a checklist as understanding: connect each step to the outcome it protects.

## Practise with evidence

Create one small example for **Intervals and sorting**. Write down your assumption, the action you take, and the observable result. If you cannot explain why the result matters, reduce the example and try again.

## A useful comparison

Think of **Intervals and sorting** like planning a journey: a destination without a route is only a wish, while a route without a destination wastes effort.

Check the decision, not just the terminology.

**Quiz:** What is the most useful way to apply Intervals and sorting?

- [x] State the goal, constraints and evidence before choosing an action.
- [ ] Copy a template without checking whether it fits.
- [ ] Use the most complex option first.

*Answer:* State the goal, constraints and evidence before choosing an action.. Good practice makes the reasoning visible, so you can review and improve it.
