First, I am a beginner. My teacher gave me a homework and told me exactly this:
"Your program will accept 1 file as input.
Each line consists of 1 string(name).
Your program will load all the names into a Heap data structure.
Then you will load the same file into a Set data structure.
Then you will load the same file into a LinkedList datastructure.
Print how long each loading takes."
From this, I understand that I need to load a .txt file into a heap data which has a few string(name) at a line. But I cannot find anything about loading a string type txt file into a heap data.
Which kind of heap data structure should I use? and how can I load that file into that heap data? Can you guys give me some recommendation please... Or am I misunderstanding the homework?