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
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.