Live Batches
Masterclasses
Menu
Free Courses
Account
Login / Sign Up
Problem Submissions Solution

Binary Tree Preorder Traversal

Difficulty: Easy

Acceptance: 79.85%

Points: 20.00

You are given the **root** of a binary tree. Your task is to return the preorder traversal of the tree. In preorder traversal, visit the root node first, then recursively traverse the left subtree followed by the right subtree.

Topics

Companies

Articles

Examples:
Constraints:
  • 0 = Number of nodes = 105
  • -10? = Node.data = 10?
Companies:
Samsung
Topics:
Tree Recursion Binary Tree
Locked Content
Access Restricted: Please Login to access the code editor and test cases.