Thursday, June 15, 2023

Re: Newtwork Marketing System

Hi Everyone!
So I want to know how to implement a binary tree to a web app.
This is how the app works:

—  Person A opens an account
—  Person A refers to people
— Person B invests,
— Person A get 10% of Person B's investment 
So it goes on iteratively.

Please note, nothing here in your description needs (or begs) to be a binary tree.

Have a referred field in the person table, which points to the PK of the person that referred them.

Then you just do a filter on that persons referred field PK to find out who referred them.

Yes, a binary tree is suppose to be one of the faster searches for certain types of data…But as described I'm not sure it's a good fit.

- Benjamin

No comments:

Post a Comment