A Ternary Tree (T) is a tree in which every non terminal node has at most 3 children.
We will use T to simulate the following activity:
A set of P candidates must pass a set of exams ordered in an array of N exam codes (an exam code is an array of char). For a given exam, a candidate can be in one of the 3 following cases: success, failure or non-passed exam yet. Thus, every T node represents an exam with: exam code as root, succeeded candidates as left child, failed candidates as right child and in the middle whose didn’t pass exam yet. The following figure depicts 2 exams and the situation of 10 candidates: how to write it :)
bgraw
0
Newbie Poster
Recommended Answers
Jump to Posthow to write it :)
Is this your question? If so, you'll need to put forth a little bit of effort. I doubt anyone is willing to write a ternary tree for you because you're too lazy to make an attempt.
Jump to Postyou need to read about it, what it is and then construct it
Jump to Posti'm so sorry for this answer but if i don't need ur help i wouldn't sign up here to contact with u!!!!!! i'm a student and i'm not good in this course this data structure i repeat it many times ,, i need to graduate only for my parents …
Jump to Posti have the whole right code for this program
We don't do homework for people here. This is not a cheat site.
Jump to PostDon't post working answers.
No worries, bakabozza didn't post a working answer. There are a number of problems with the posted Init() function such that it's completely unusable without fixing some fundamental errors. And this is excluding the required addition of scaffolding to make it compile.
All 22 Replies
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
bgraw
0
Newbie Poster
Sokurenko
42
Junior Poster
bgraw
0
Newbie Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
ziziBA
-3
Newbie Poster
bakabozza
0
Newbie Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
Sokurenko
42
Junior Poster
bakabozza
0
Newbie Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
bakabozza
0
Newbie Poster
bakabozza
0
Newbie Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
bakabozza
0
Newbie Poster
deceptikon
1,790
Code Sniper
Team Colleague
Featured Poster
WaltP
commented:
True, but he DID offer working code -- which is cheating.
+0
ziziBA
-3
Newbie Poster
WaltP
commented:
All this talk about cheating meant nothing to you, obviously...
-3
ziziBA
-3
Newbie Poster
ladydidi
0
Newbie Poster
bakabozza
0
Newbie Poster
ziziBA
-3
Newbie Poster
bakabozza
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.