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.
Kitty's Calculations on a Tree
Kitty's Calculations on a Tree
Sort by
recency
|
61 Discussions
|
Please Login in order to post a comment
I was able to find some useful hints in the discussions, but they're buried below a mountain of misinformation and nonfunctional solutions. So if you're looking for help, here are the basic components of the solution (or at least, of a solution).
I'm not sure if we can get a solution in js/ts. I have adapted a working c++ solution. It gets tests 1-6 correct, 7-9 wrong, everything else times out.
Code:
WTF i can do each query in O(n) time but i get time out on 3 questions, and stack overflow on 2 questions because the tree is too deep
this question is fuking RIDICULOUS
Hey can someone help me out solving these problems? My friend sent this contest to me. He says its for noobs but I dont think it is. I cant solve it without any help because I'm new to competitive programming. Here is the contest: https://www.hackerrank.com/newbie-challenge
i feel like it's more about graphs rather then trees, isn't it?