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.
WRONG! The problem statement clearly indicates that first node is the root of the Tree.
Quoting from problem statment:
"The next line will contain NN integers separated by a single space, i.e. the values assigned to each of the vertices (where the first one is the root of the tree)."
See the last part there -> "(where the first one is the root of the tree)"
So the first node is supposed to be the root of the tree. But the test case data does not seem to honor this.
Which completely invalidates this test.
I see this all the time in Hacker Rank where the problem description is misleading or erroneous which completely SUCKS!!!
HackerRank MUST VALIDATE THAT ALL CONDITIONS ON ALL TESTS ARE AS STATED IN THE PROBLEM AND MUST MAKE SURE THE SAMPLE DATA IS INDICATIVE OF ALL THE DATA IN THE TEST CASES.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Cut the Tree
You are viewing a single comment's thread. Return to all comments →
WRONG! The problem statement clearly indicates that first node is the root of the Tree.
Quoting from problem statment: "The next line will contain NN integers separated by a single space, i.e. the values assigned to each of the vertices (where the first one is the root of the tree)."
See the last part there -> "(where the first one is the root of the tree)"
So the first node is supposed to be the root of the tree. But the test case data does not seem to honor this.
Which completely invalidates this test.
I see this all the time in Hacker Rank where the problem description is misleading or erroneous which completely SUCKS!!!
HackerRank MUST VALIDATE THAT ALL CONDITIONS ON ALL TESTS ARE AS STATED IN THE PROBLEM AND MUST MAKE SURE THE SAMPLE DATA IS INDICATIVE OF ALL THE DATA IN THE TEST CASES.