Maurice Tutor


$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 151 Weeks Ago
Questions Answered: 66690
Tutorials Posted: 66694


    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011


  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Communications Posted 17 Sep 2017 My Price 8.00

node’s value

There is an infinite binary tree which has following structure:

3 / \ 6 8 / \ / \ 11 13 15 17 / \ / \ / \ / \ 20 22 24 26 28 30 32 34 ...

This tree has a formula to get each node’s value. Base of the formula is even binary tree which is infinite tree made of even numbers with root node 2.
Root node’s level is 1 and level of its child nodes is 2 and so on.
Based on value of node in even tree and its level; above tree is formed


First line of input contains a number T, which is total number of test cases.
Following T lines contains a number N.


For every test case, output a single line containing either NO, LEFT or RIGHT.
Output NO if the number N is not in the tree.
Output LEFT if the number is in the tree and its left child of its parent node.
Output RIGHT if the number N is in the tree and its right child of its parent node.


  • 1 = T = 100
  • 4 = N = 10^7


Input: 3 39 16 70 Output: RIGHT NO LEFT



For 34, Its in the tree and its right child of 20.

16 is not in the tree, hence output is NO.

70 is left child of 37, so output is LEFT.


Status NEW Posted 17 Sep 2017 12:09 PM My Price 8.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll

Not Rated(0)