3 You Have Been Given A File With Two Columns A Name And An Integer Whole Number Repre Senting How Many Minutes A U 1 (44.45 KiB) Viewed 23 times
3. You have been given a file with two columns: a name and an integer (whole number) repre- senting how many minutes a user spent playing a particular game in the last 24 hours. The file will look something like: Erik 10 Laila 46 Tien 367 It is not known at the outset how many rows are in the file, however the file will be terminated by EOF (end of file).
b) ** [2 marks] What is the likely complexity of your program using big-O notation? Clearly point out what the primary parameters are and define your terms. C) **[4 marks] Rewrite your algorithm using pseudocode. There is one change to be made: this time you should calculate the average time spent in the game instead. Submission of actual code (e.g., in Ruby or Python or any other programming language) will be awarded zero marks - we are seeking pseudocode.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!