> I can't think of a better solution for those five stations. What's the bug?
Let's start with the obvious:
"Notting Hill Gate - Bermondsey - Stratford"
Bermondsey[1] is only on the Jubilee
Notting Hill Gate[2] is not served by the Jubilee, but Central and Circle/District
Stratford[3] is on both Jubilee and Central Line
Therefore try as you might, you are not going to find a train that goes from Notting Hill to Bermondsey and nor is there a direct connection between lines available.
The challenge asks for a "route that passes through all stops". Therefore (I assume) we are only allowing either no connections or direct connections, and not indirect circuitous routes with multiple indirect connections.
After all, most sensible Londoners plan their route that way and would rather, for example, walk, than take a circuitous indirect connection (because walking is often quicker than multiple connections, especially in the central zones).
The other bug:
"Stamford Brook - West Brompton - Notting Hill Gate"
Is just an odd route since Stamford Brook and West Brompton are on different branches, so the answer requires un-necessary tromboning, and in reality there's no sensible answer, because you could equally go "West Brompton - Stamford Brook - Notting Hill Gate", since there's no escaping the Earls Court trombone. Whichever way, it's not a route any sane human would ever take.
[1] https://tfl.gov.uk/tube/stop/940GZZLUBMY/bermondsey-undergro...
[2] https://tfl.gov.uk/hub/stop/940GZZLUNHG/notting-hill-gate-un...
[3] https://tfl.gov.uk/tube/stop/940GZZLUSTD/stratford-undergrou...