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

AI · Theory

Uninformed Search

← All stacks

Theory

21/215

Uninformed Search

Uninformed search has no heuristic. BFS uses a queue — shortest path if every step costs 1. DFS uses a stack — can dive deep, may miss a nearby goal. UCS (uniform cost) expands cheapest path first — like Dijkstra. IDS repeats DFS with a rising depth limit.

Trap — DFS is not “always faster”. On a huge tree it can get lost. BFS eats memory. Say those two costs out loud.

Uninformed Search — output — three lines. No heuristic.

Diagram
start
    ├── BFS  queue
    ├── DFS  stack
    └── A*   g+h
    │
    ▼
   goal
Exam tip

BFS vs DFS: data structure + when shortest.

Example

# Uninformed search
print("BFS: queue  → shortest hops (cost=1)")
print("DFS: stack  → may miss a nearby goal")
print("UCS: cheapest g(n) first")

Uninformed Search — output: three lines. No heuristic.

Short notes

  • DefBFS queue. DFS stack. UCS cheapest path.
  • RuleNo h(n).

Questions

1

Explain Uninformed Search as if you are teaching a junior — definition, then one example.

2

What does the example print, and what does that prove?

3

What mistake do freshers make with Uninformed Search?

Previous← Search AlgorithmsNextA* Search Algorithm →
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.