Interview concept

What is Dijkstra's algorithm?

Dijkstra's algorithm computes the shortest path from a source node to every other node in a weighted graph with non-negative edges. It repeatedly expands the closest unvisited node using a priority queue.

Summary

Key takeaways

Dijkstra's algorithm - Interview Concepts - ExtraBrain is part of ExtraBrain's local-first Mac workflow for live interviews, meetings, transcription, provider control, and responsible AI use.

Page focus

Dijkstra's algorithm computes the shortest path from a source node to every other node in a weighted graph with non-negative edges. It repeatedly expands the closest unvisited node using a priority queue.

Platform fact

ExtraBrain has 1 current public platform family, macOS, with support for 2 Mac CPU families: Apple Silicon and Intel.

Data-flow fact

ExtraBrain has 3 configurable data paths to review before sensitive work: local Parakeet transcription, local Gemma 4 where installed and compatible, and external providers you choose.

Interview concept

How it works

How it works

Keep tentative distances, always expand the nearest unvisited node, and relax each of its neighbors.

Priority queue

A min-heap makes selecting the closest node efficient, giving O((V plus E) log V) time.

Limitations

It requires non-negative weights; for graphs with negative edges use Bellman-Ford instead.

Interview concept

Responsible use

Use any live AI assistant only where interview, workplace, school, and platform rules allow it. Do not use generated answers to misrepresent your skills, experience, or authorship.

FAQ

Common questions.

Short answers for people and crawlers comparing ExtraBrain with other live AI assistants.

Why does Dijkstra need non-negative weights?

A negative edge can make an already-finalized node reachable more cheaply later, breaking the greedy assumption.

What data structure speeds up Dijkstra?

A binary or Fibonacci heap used as a priority queue selects the nearest node efficiently.