Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEAReally nice challenge
My solution for this week's challenge. @AYXAcademy I think the proposed solution/output is not correct.
James Patterson has been 200 weeks on the list instead of 195. Those extra 5 weeks come from 4 book titles ( namely 113 minutes, Chase, The medical examiner and Zoo 2), which are written by two authors, the names of who are separated by using "with" instead of an "and" which is the usual pattern.
i.e. by James Patterson with Max DiLallo
instead of
by James Patterson and Michael Ledwidge
For that reason, James Patterson should have 45 books on the list instead of 41, as when a book has more than 1 author then those should be counted separately.
Finally, E.L. James has 94 weeks on the list from 3 books instead of 85 weeks from 2 books, as proposed in the solution. That's because the same author name is written with two different ways (E. L. James and E.L. James) and that should be taken into account.
I totally saw that with E.L. James! But I didn't catch the 'with' portion. Great read on the data!
I didn't adjust for the E.L. vs. E. L. since I was trying to align to the expected solution!
I completed this challenge, but I am getting slight different answer.
For James Patterson I got 200 Weeks on list and 45 Titles. I guess I have broken the Author name using " with ", others didn't do it. So every one else got 195.
author | Weeks on List | Number of Books on List |
James Patterson | 195 | 41 |
James Patterson with Max DiLallo | 3 | 2 |
James Patterson with Maxine Paetro | 1 | 1 |
James Patterson with Michael Ledwidge | 1 | 1 |
Sam 🙂