We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
  • Hackerrank Home
  • Prepare
    NEW
  • Certify
  • Compete
  • Career Fair
  • Hiring developers?
  1. Tree: Preorder Traversal
  2. Discussions

Tree: Preorder Traversal

Problem
Submissions
Leaderboard
Discussions
Editorial

Sort 24 Discussions, By:

votes

Please Login in order to post a comment

  • okigan
    8 months ago+ 1 comment

    Seems like a silly problem for day 7 of 7 day prep course.

    17|
    Permalink
  • adzhiametov
    6 months ago+ 0 comments

    Evaluated as "Advanced"... Solved in 5 min. But some previous tasks evaluated as Basic or Intermediate took aroud 1 day. lol

    10|
    Permalink
  • tsmackinlay
    7 months ago+ 1 comment

    Is the typescript code supposed to have everything except the preOrder function predefined, like the starter code for other languages?

    Currently it requires you to define the BinaryTree data type and convert the input string to a Binary Tree.

    5|
    Permalink
  • JavaCoder2022
    3 weeks ago+ 0 comments

    Why is this problem "Advanced"? Literally solved in 2 minutes.

    1|
    Permalink
  • Neetamludba
    7 months ago+ 0 comments

    my C++ Solution

     void preOrder(Node *root) {
            if(root)
            {cout<<root->data<<" ";
            preOrder(root->left);
            preOrder(root->right);
            }
        }
    
    1|
    Permalink
Load more conversations

Need Help?


View editorial
View top submissions
  • Contest Calendar
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy
  • Request a Feature