| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Stop wasting time looking for files and revisions. Connect your Gmail, DriveDropbox, and Slack accounts and in less than 2 minutes, Dokkio will automatically organize all your file attachments. Learn more and claim your free account.

View
 

PE022

Page history last edited by Kenneth Finnegan 12 years, 3 months ago

Project Euler Problem #22

 

Nothing too smart about this solution, problem wasn't big enough to need anything more than brute force.

 

I first loaded the entire names.txt file into a string, then tokenized it (using strtok) into each individual word.  Each word was stored in a "Node", all of which are stored in a sorted linked list.  Finally I run through the linked list and add up all the scores and display it.

 

Run time: 0.448 seconds

 

PE022_c

 


Return to list of solutions

Comments (0)

You don't have permission to comment on this page.