Skip to content

Pattern: BFS (Trees + Graphs) #26

@sudosf

Description

@sudosf

Objective

Master breadth-first search on trees and graphs from the RisingBrain DSA sheet.

References

Pattern Description

Use a queue (ArrayDeque in Java). Process nodes level by level. Mark visited before enqueuing (graphs).

Sub-issues

# Problem Difficulty
1 Binary Tree Level Order Traversal Medium
2 Binary Tree Right Side View Medium
3 Binary Tree Zigzag Level Order Traversal Medium
4 Number of Islands Medium
5 Word Ladder Hard

Notes

Language: Java
Use ArrayDeque, not LinkedList, as the queue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bfsBreadth-first searchgraphGraph problemstreeTree problems

    Projects

    Status
    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions