Which data structures are used in BFS and DFS algorithm? | Eklavya Online

Which data structures are used in BFS and DFS algorithm?

  • In BFS algorithm, Queue data structure is used.
  • In DFS algorithm, Stack data structure is used.