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

    HackerRank

  • |
  • Prepare
  • Certify
  • Compete
  • Hiring developers?
  1. Prepare
  2. Functional Programming
  3. Recursion
  4. The Tree Of Life
  5. Discussions

The Tree Of Life

Problem
Submissions
Leaderboard
Discussions
Editorial

    You are viewing a single comment's thread. Return to all comments →

  • sharon_shmorak
    5 years ago+ 1 comment

    Hi, I don't understand what exactly the input of each step (e.g. query) mean. After initialization input, we get a query of this form: 2 [><] What I understand is that we should start at the root traverse the tree denoted by the path while applaying the rule to the final destination of the path. We output the state of the neighbour denoted by the first number (2 in the example). Am I right? Should the rule be applied to all nodes the path goes through or just the destination? should we start at each step from the root of the tree or should we continue from the position we ended up in previous query?

    0|
    Permalink
  • Blog
  • Scoring
  • Environment
  • FAQ
  • About Us
  • Support
  • Careers
  • Terms Of Service
  • Privacy Policy