bojanlozanovski77
BAN USER
- 0of 0 votes
AnswersGiven 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
Thank you for the reply, but this is not recursion.
- bojanlozanovski77 August 16, 2017
Replisanielson212, Associate at ASAPInfosystemsPvtLtd
Now I work in freelancing in Search Engine optimization. I like reading nobbles, old stories, love stories. I am happy ...
RepI am Jenae Wilder and I work as a content writer, A writer at day, and a reader at night ...
RepDimaOxygen15, 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 ...
Repsherykasper, Accountant at A9
Bonjour, je travaille dans une entreprise en tant que caissier. J'habite à Maysville mais je suis en fait d ...
RepElenaKudaeva455, 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 ...
Repriverajenny935, 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 ...
RepShakirajensen45, 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 ...
Repsunstaley212, 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 ...
Repmethali0001, 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 ...
RepNutsaAvaliani47, Student at Service Now
Hello Everyone,I am Nutsa Avaliani and I have been educating for more than 27 years and totally love it ...
RepRocioNavarro189, None at Student
Hello Everyone,My name is Rocio Navarro Form Auckland,NZ,and 31 years old.I am searching for a servant ...
RepVirginialdelmonte, Animator at lostlovebackvashikaran
Have you lost your husband love? And you want to control your husband mind with vashikaran mantra. Guru ji is ...
RepSCREENish employee time tracking software can be used as desktop or mobile app. Once the employee has tracked his working ...
RepAre you wasting time for to search a professional astrologer and specialist to get rid of black magic?Black Magic ...
Reploveastrologyspecialist7, 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 ...
Repsunita212jain, 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 ...
Repbedinisha374, 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 ...
@ChrisK thank you for the solution, this is sth more like that that I was looking for... maybe I took the question too literally.. maybe I could have used a recursive method in the background, and my initial method would have contained only 2 arguments.
- bojanlozanovski77 August 17, 2017