Ready for your dream job?

Welcome to the most accessible guide to technical interviews. Here's a preview of how the platform will look.

We believe that technical interviews are a matter of practicing well. We've referenced hundreds of resources on habit change, education design, and algorithms to design the best and most streamlined learning experience.

Subscribe now


June 7, 2020

The difference between theory and practice is that in theory, there is no difference between theory and practice.

- Richard Moore

Day 9: Binary Tree Inorder Traversal

Can you write a function to traverse a binary tree in-order, and print out the value of each node as it passes?


The example would output [4, 6, 5] since there is no left child for 4, and 6 is visited in-order before 5.

The definition of a tree node is as follows:

function Node(val) {
  this.val = val;
  this.left = null;
  this.right = null;

Follow up: you'll likely get the recursive solution first, could you do it iteratively?

Have you seen this question before? We are frequently adding problems and may have updated the order. You can change the day that you're on in the settings panel.

Click to solve →

As always, you can see the solution and a full step by step explanation at this link.

The Full AlgoDaily Course

AlgoDaily's technical interview course gets results!

Love the daily emails? AlgoDaily exists to provide high quality coding interview prep and career resources to developers from non-traditional paths. In the course, you'll find:

One last thing-- if you liked this email, and found value in it, could you kindly forward it to a friend who might benefit?

Our mission is to make tough technical interviews accessible to all, especially those from non-traditional CS backgrounds. I'd deeply appreciate your help in spreading the word!


Sign up for our newsletter list and join over 3,000 brilliant developers leveling up and solving coding challenges daily.

Preview now

Back Terms and Conditions