Coursera
Traverse Trees for ML with DFS & BFS

Enjoy unlimited growth with a year of Coursera Plus for $199 (regularly $399). Save now.

Coursera

Traverse Trees for ML with DFS & BFS

Starweaver
Scott Cosentino

Instructors: Starweaver

Included with Coursera Plus

Gain insight into a topic and learn the fundamentals.
Advanced level

Recommended experience

3 hours to complete
Flexible schedule
Learn at your own pace
Gain insight into a topic and learn the fundamentals.
Advanced level

Recommended experience

3 hours to complete
Flexible schedule
Learn at your own pace

What you'll learn

  • Analyze the differences between Breadth-First Search and Depth-First Search to understand when to use each approach.

  • Implement a Breadth-First Search and Depth-First Search in Java to traverse decision trees.

  • Apply tree traversal algorithms such as BFS and DFS to generate rulesets from decision trees.

Details to know

Shareable certificate

Add to your LinkedIn profile

Recently updated!

December 2025

Assessments

1 assignment

Taught in English

See how employees at top companies are mastering in-demand skills

 logos of Petrobras, TATA, Danone, Capgemini, P&G and L'Oreal

There are 3 modules in this course

Tree searching algorithms are a core method for traversing tree-based data structures. In this module, we'll explore the strucutre of decision trees and understand how a breadth-first and depth-first search for be applied to traverse decision tree structures.

What's included

4 videos2 readings1 peer review

With an understanding of the theory of tree traversals, we can now move towards an implementation of our traversal algorithms. In this module, we'll explore how DFS and BFS can be implemented Java. We'll also take a look at how these algorithms can be analyzed to understand both time complexity and potential use cases.

What's included

3 videos1 reading1 peer review

One of the main applications of BFS and DFS for decision trees is the creation of tree rules. In this module, we'll see how both BFS and DFS can be applied to generate tree rules for a decision tree. We'll also explore how these approaches compare to other common tree rule generations such as ID3 and CART.

What's included

4 videos1 reading1 assignment2 peer reviews

Instructors

Starweaver
Coursera
482 Courses916,490 learners

Offered by

Coursera

Why people choose Coursera for their career

Felipe M.
Learner since 2018
"To be able to take courses at my own pace and rhythm has been an amazing experience. I can learn whenever it fits my schedule and mood."
Jennifer J.
Learner since 2020
"I directly applied the concepts and skills I learned from my courses to an exciting new project at work."
Larry W.
Learner since 2021
"When I need courses on topics that my university doesn't offer, Coursera is one of the best places to go."
Chaitanya A.
"Learning isn't just about being better at your job: it's so much more than that. Coursera allows me to learn without limits."
Coursera Plus

Open new doors with Coursera Plus

Unlimited access to 10,000+ world-class courses, hands-on projects, and job-ready certificate programs - all included in your subscription

Advance your career with an online degree

Earn a degree from world-class universities - 100% online

Join over 3,400 global companies that choose Coursera for Business

Upskill your employees to excel in the digital economy

Frequently asked questions