Click here to Skip to main content
15,923,226 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCString::GetBuffer Pin
Abin8-Jul-02 15:39
Abin8-Jul-02 15:39 
GeneralRe: CString::GetBuffer [edited due to slight error] Pin
Nish Nishant8-Jul-02 15:44
sitebuilderNish Nishant8-Jul-02 15:44 
GeneralRe: CString::GetBuffer [edited due to slight error] Pin
Abin8-Jul-02 16:54
Abin8-Jul-02 16:54 
GeneralRe: CString::GetBuffer [edited due to slight error] Pin
Rene De La Garza8-Jul-02 17:08
Rene De La Garza8-Jul-02 17:08 
GeneralRe: CString::GetBuffer [edited due to slight error] Pin
Christian Graus8-Jul-02 17:53
protectorChristian Graus8-Jul-02 17:53 
Generalusing delete() in recordset Pin
8-Jul-02 15:28
suss8-Jul-02 15:28 
GeneralRe: using delete() in recordset Pin
Carlos Antollini8-Jul-02 20:12
Carlos Antollini8-Jul-02 20:12 
GeneralRECOVERING A BINARY TREE FROM ITS POST-ORDER CODE!! Pin
barking_dogs8-Jul-02 14:35
barking_dogs8-Jul-02 14:35 
Algorithm void PostOrderPlus(bintree MyBinT ree )
if MyBinT ree ·is-empty then print(‘0 ’) return() endif
PostOrderPlus(MyBinT ree.lefttree )
PostOrderPlus(MyBinT ree.righttree )
print(MyBinTree.info)
end algorithm PostOrderPlus

THIS ALGORITHM creates a sequence of numbers such as:
0 0 1 0 0 3 0 0 7 4 2 0 0 8 6

I am trying to figure out a way to recreate the tree if the POST ORDER
traversal aequence is given as shown above.

This is what I am required to do:-

You will be given a sequence of symbols, and you can assume that the first symbol is the special delimiter symbol. It is then up to your program to decide whether or not the sequence is a POPS of a binary tree. If it is not a POPS, print a message to that effect. If it is a POPS, construct the binary tree and compute, for each level of the constructed tree, the number of nodes at that level. Also, find the depth of the tree, and find a node whose depth is equal to the depth of the tree (and find the right-most such node if there is more than one such node). Finally, find the frequency of the root-value in the tree: if the value is not repeated, then test to see if the binary tree happens to be a search tree. So for this project, you must design several algorithms (with supporting abstract datastructures in an algorithmic language), that solves the problem(s).

The POPS works in the following manner (reading the sequence right to
left):
1. The last number is the root
2. The previous number is the right child
- If the previous number is zero that means that there is no child
there; or if there are two zeros that the number is a leaf.
3. The number previous to the previous number (in 2.) would be th left
child to the next number that follows.

PLEASE HELP ME!!

Confused | :confused: Confused | :confused: Unsure | :~

NO
GeneralRe: RECOVERING A BINARY TREE FROM ITS POST-ORDER CODE!! Pin
Christian Graus8-Jul-02 16:56
protectorChristian Graus8-Jul-02 16:56 
QuestionCalling a parent method? Pin
clintsinger8-Jul-02 14:07
clintsinger8-Jul-02 14:07 
AnswerRe: Calling a parent method? Pin
Chris Losinger8-Jul-02 14:17
professionalChris Losinger8-Jul-02 14:17 
GeneralRe: Calling a parent method? Pin
clintsinger8-Jul-02 15:19
clintsinger8-Jul-02 15:19 
GeneralMouse Messages Pin
carp8-Jul-02 13:47
carp8-Jul-02 13:47 
GeneralRe: Mouse Messages Pin
Christian Graus8-Jul-02 16:57
protectorChristian Graus8-Jul-02 16:57 
GeneralRe: Mouse Messages Pin
carp10-Jul-02 5:55
carp10-Jul-02 5:55 
GeneralRe: Mouse Messages Pin
Christian Graus10-Jul-02 12:29
protectorChristian Graus10-Jul-02 12:29 
GeneralVariable Number of Arguments Pin
8-Jul-02 13:03
suss8-Jul-02 13:03 
GeneralRe: Variable Number of Arguments Pin
8-Jul-02 13:07
suss8-Jul-02 13:07 
GeneralRe: Variable Number of Arguments Pin
Chris Losinger8-Jul-02 14:18
professionalChris Losinger8-Jul-02 14:18 
GeneralRe: Variable Number of Arguments Pin
8-Jul-02 16:07
suss8-Jul-02 16:07 
Questionpragma warning disable? Pin
User 66588-Jul-02 11:06
User 66588-Jul-02 11:06 
AnswerRe: pragma warning disable? Pin
Stuart Dootson8-Jul-02 12:42
professionalStuart Dootson8-Jul-02 12:42 
AnswerRe: pragma warning disable? Pin
Michael Dunn8-Jul-02 16:53
sitebuilderMichael Dunn8-Jul-02 16:53 
GeneralRe: pragma warning disable? Pin
User 66589-Jul-02 0:03
User 66589-Jul-02 0:03 
Questionmalloc/new vs GlobalAlloc strategy ? Pin
yarp8-Jul-02 9:59
yarp8-Jul-02 9:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.