PGoCareerGoCareer prep tools
Home
LoginSign up
  • Java
  • Python
  • AI
  • React
  • Angular
  • PHP
  • Node.js
  • SQL
  • DSA
  • HTML
  • CSS
  • JS
  • Spring
  • ML
  • MongoDB

DSA · Theory

Adjacency List

← All stacks

Theory

800/810

Adjacency List

Adjacency List is simple if you keep it on paper. Amit uses it for Adjacency List on Amit's board in lab hour.

Adjacency List order: meaning → one Adjacency List step Amit can write from memory → one limit. Dumping ten features helps nobody.

Adjacency List exists so Amit can keep Adjacency List on Amit's board correct in lab hour.

Adjacency List shows up in lab hour. Name Adjacency List on Amit's board, not “a real-world scenario”.

Adjacency List miss — copy-pasting Adjacency List without a dry-run. Fix it before you talk about advanced DSA.

After Adjacency List, Amit should still remember copy-pasting Adjacency List without a dry-run.

Close Adjacency List with: “If I skip it, Adjacency List on Amit's board goes wrong like this: copy-pasting Adjacency List without a dry-run.”

Exam tip

Say Adjacency List in one breath, then one Adjacency List step Amit can write from memory, then copy-pasting Adjacency List without a dry-run.

Example

# adjacency list
graph = {
    "A": [("B", 2), ("C", 5)],
    "B": [("A", 2), ("C", 1)],
    "C": [("A", 5), ("B", 1)],
}
for u, edges in graph.items():
    print(u, "->", edges)

Adjacency List — graphs are often stored as adjacency lists: vertex → list of (neighbor, weight).

Short notes

  • DefAdjacency List — Amit uses it for Adjacency List on Amit's board in lab hour.
  • RuleAdjacency List → one Adjacency List step Amit can write from memory.
  • RememberAdjacency List + time vs memory (lab hour).
  • UseAdjacency List in lab hour (Adjacency List on Amit's board).
  • TrapAdjacency List — copy-pasting Adjacency List without a dry-run.
  • ExAdjacency List → Adjacency List on Amit's board.

Questions

1

Amit asks: why does Adjacency List exist? Use Adjacency List on Amit's board.

2

When would Amit actually reach for Adjacency List?

3

Viva: one wrong answer people give for Adjacency List.

4

Change one input on Adjacency List on Amit's board. Predict the new result.

Previous← Complex Data StructuresNextLinked List Operations →
P

GoCareerGo

Utilities · Preparation Hub · Resume · CV · Tools — one workspace.

Workspace

DashboardProfilePreparation HubResume builderCV builderCareer planning

PDF Tools

Merge PDFSplit PDFCompress PDFImage to PDFAll toolsJobs

Image & QR

Compress ImageResize ImageQR ScannerQR GeneratorBlogIT interview prep

Company

FAQFeedbackContactPrivacyTermsSitemap

© 2026 GoCareerGo. Keep moving forward.