# A Star Admissible Heuristic: Explained

A Star Admissible Heuristic shows up often in coding rounds. Here is how I talk through it when the interviewer is watching.

## Key idea

Expand vertices in order of g(u) + h(u) where h never overestimates remaining cost, which is equivalent to Dijkstra on reduced costs and finds an optimal path.

## Steps to say out loud

1. Restate the input and the exact ask, and nail down constraints and overflow.
2. Name the pattern (binary search on the answer, monotonic stack or deque, interval / interval-DP, string hashing, graph traversal, or shortest paths) and why a nested scan or naive search fails.
3. Code it, then trace a short example plus one empty or already-solved edge case.

## Complexity

Same complexity as Dijkstra with the heuristic-ordered heap; expands fewer nodes when h is informative.

## Common mistake

Using an inadmissible (overestimating) heuristic, which can return a suboptimal path the first time the goal is dequeued.

## Practice tip

Time yourself: two minutes to explain, ten to code, three to test edges. Disclosure: I work on Linkjob AI. I also keep a practice cheat sheet at www.linkjob.ai.