Hey today I was at an interview where they gave us a tree with an unknown structure (maybe not binary), and I was asked to insert it into the database in a certain order, where I could return the dB to the tree and show that I did it uses the model ER, each node in the tree has two data items data1 and data2
can someone answer or give me a hint how this is done?
EDIT: what I wrote is that every child has a father, we must add a connection between the nodes of the father and son because the son has one father, the son has an arrow one to one to his father - I gave each of these, a pointer, and each sun had a pointer to his father, and what does it have to do with the ER model? I don’t know, that’s why I asked him here.
source
share