logo CodeStepByStep logo

coolest

Language/Type: C++ graphs collections
Related Links:

Write a function coolest that accepts a string representing a file name as a parameter and reads this file of Twitter followers, with each line representing "name1 follows name2":

name1 name2
name1 name2
...

And returns a string representing the name of the person with the most followers-of-followers. Use a BasicGraph to help you compute the answer.

You may assume that the input file exists, follows the format above, contains valid data, and contains at least one person who has at least one follower-of-followers.

Function: Write a C++ function as described, not a complete program.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.