BFS

Challenges: 6Medium: 5Hard: 1

This BFS set gathers 6 coding problems, with a mix of 5 medium, 1 hard. They show up in interviews at companies like Amazon, Meta, Microsoft, Careem, Microsoft Egypt, so you can master the pattern once and recognize it everywhere.

BFS coding problems

  • Binary Tree Level Order Traversal

    Difficulty: MediumAsked by: Amazon, Meta, Microsoft
  • Maximum Depth of Binary Tree

    Difficulty: MediumAsked by: Amazon, Microsoft
  • Keys and Rooms

    Difficulty: MediumAsked by: Careem
  • Level Order Traversal

    Difficulty: MediumAsked by: Careem, Microsoft Egypt
  • Number of Islands

    Difficulty: MediumAsked by: Dubizzle, Noon
  • Serialize and Deserialize Binary Tree

    Difficulty: HardAsked by: Google, Meta, Microsoft

Asked by

Ready to practice for real?

Work through BFS problems in the editor, run your code, and check your solution against real test cases.

Practice coding challenges, start free