I'm asked to fill a binary tree from file like lab.in . I don't know what type it is and I don't how I can make it read the data in it and call inset function to fill the tree. Please help.
This is lab.in
52 3.2
34 3.4
32 2.9
52, 34, and 32 are the keys to determine the nodes position in the tree. 3.2 , 3.4 and 2.9 are data stored in the nodes.
I am also having this problem where i need to add Strings into a tree list. I managed to get the program to read the file but i dont understand how to go through the file reading one string at a time and inserting it into the tree.
I have 1000 words and only can use a tree. I tried googleing it but could not find the right answer for my problem. IF someone can atleast point me in the right direction on how to iterate through the file it would be awesome. :)