DatadogSoftware Engineer · OnsiteCodemia practicetraversal on Binary Tree
Given a binary tree, implement a function to perform a traversal of the tree in a specified order (e.g., in-order, pre-order, or post-order) and return the values of the nodes as a list. The function should take the root node of the binary tree as input and output a list of integers representing the node values in the order they were traversed.
Medium
Coding & Algorithms