- 0of 0 votes
Given a binary tree, write a recursive method boolean method(int x, int y) which will return true- bojanlozanovski77 in United States
1. if node y (meaning a node with a value of int y) is a node that is contained in one of the two possible subtrees of x,
2. true if x==y, and a node with a value x==y exists, otherwise
3. return false,
basicallly whether x contains y? I had a question like this on my exam, I solved this problem using four arguments in my function. I wonder whether it is even possible to solve it with only 2 int arguments and recursively.
| Report Duplicate | Flag | PURGE
Trees and Graphs
lisanielson212, Associate at ASAPInfosystemsPvtLtd
Now I work in freelancing in Search Engine optimization. I like reading nobbles, old stories, love stories. I am happy ...
I am Jenae Wilder and I work as a content writer, A writer at day, and a reader at night ...
DimaOxygen15, Computer Scientist at Headrun Technologies Pvt Ltd
Hi! all my sweets friends My name is Dimo Oxygen! Now I study in Victoria University of Wellington New Zealand ...
sherykasper, Accountant at A9
Bonjour, je travaille dans une entreprise en tant que caissier. J'habite à Maysville mais je suis en fait d ...
ElenaKudaeva455, Music Piano Store at xyz
Hello Everyone,My name is Elena Kudaeva From NV,Nevada,USA.I am 16 years of age and I have ...
riverajenny935, i love my shop piano at xyz
Hello Everyone,My Name is Jenny Rivera .I have been a piano instructor for more than 25 years! I earned ...
Shakirajensen45, Program Manager at Service Now
Shakira Jensen piano at Meridian Music from 2004-2010, and it is a benefit to welcome him back. He has numerous ...
sunstaley212, Graphics Programmer at Service Now
Hello Everyone, My name is sun staley and I am from new zealand. I might want to attempt this experience ...
methali0001, Front-end Software Engineer at Coupon Dunia
I am website designer in India Chandigarh. I done Msc in IT. I open a new small company for designing ...
NutsaAvaliani47, Student at Service Now
Hello Everyone,I am Nutsa Avaliani and I have been educating for more than 27 years and totally love it ...
RocioNavarro189, None at Student
Hello Everyone,My name is Rocio Navarro Form Auckland,NZ,and 31 years old.I am searching for a servant ...
Virginialdelmonte, Animator at lostlovebackvashikaran
Have you lost your husband love? And you want to control your husband mind with vashikaran mantra. Guru ji is ...
SCREENish employee time tracking software can be used as desktop or mobile app. Once the employee has tracked his working ...
Are you wasting time for to search a professional astrologer and specialist to get rid of black magic?Black Magic ...
loveastrologyspecialist7, Program Manager at Service Now
Hello Everyone,My name is Asena Kaya from Texas,United States. I am 25 years old.i am in the ...
sunita212jain, Android test engineer at Computer Associates
My name is Sunita jain. I am in Chandigarh (India). I am a computer hardware retailer and wholesaler. I also ...
bedinisha374, Project Leader at design
Juliana Christ, as I am a Project Manager at Morissette-Hegman, having experience of 6 years, currently dealing with brampton heating ...