Jump to content

MLM-Display binary Tree


killervastu

Recommended Posts

Hey guys,

i am a college student and working on a project of mlm ad want to display the binary income tree,and also calculate the income that is given to each node.

Please see the attachments for the binary tree structure and database table structure.

Thanks.

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/250796-mlm-display-binary-tree/
Share on other sites

This can easily be done with a pre-order recursive function, passing the multiplier back up from the children to be used when printing the parents.  Google for pre-order recursion.

 

Also, what demented professor uses MLM schemes as teaching material?  I hope he told you that they're both evil and illegal.

This can easily be done with a pre-order recursive function, passing the multiplier back up from the children to be used when printing the parents.  Google for pre-order recursion.

 

Also, what demented professor uses MLM schemes as teaching material?  I hope he told you that they're both evil and illegal.

Thanks

 

but what to do according to them after completing this project i would have a small amount of good knowledge of php  :)

All you have is 4 database columns and zero knowledge of PHP?  Ask your professor/TA for help.  Yes, creating an object tree and implementing pre-order recursion (possibly followed by in-order recursion) would give you a good knowledge of PHP, that's why it was week 14 in my CompSci 101 course.  You need a lot more base for this.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.