Chapter 3 - $graphLookup lab

Find the list of all possible distinct destinations, with at most one layover, departing from the base airports of airlines from Germany, Spain or Canada that are part of the “OneWorld” alliance. Include both the destination and which airline services that location. As a small hint, you should find 158 destinations.

The only constraint is that the starting airport is the base airport of a selection of airlines. Nowhere is it mentioned that the flights must use airlines of the OneWorld alliance, the only restriction is on the starting airport.

Yet in the detailed answer:

After this, we’ll unwind our connections array, and then use $project to add a field representing whether this particular route is valid, meaning it is a route flown by one of our desired carriers.

Hi @Eliott_Coyac,

Thank you for your query. I’m not certain that I understand the question that you are posing. The question prompt states that the airlines have to be part of the “OneWorld” alliance. Is the detailed answer contradicting that?

Hi @Yulia_Genkina

The question prompt states that the airlines have to be part of the “OneWorld” alliance.

The current question, the way it is worded, does not.

It only talks about restrictions on the base airports, not restrictions on the airlines used for travel.

Hi @Eliott_Coyac,
I’ve highlighted the part of the question that specifies OneWorld alliance below in a quote as well as on a screenshot of the question. Are you seeing a different question prompt?

“Find the list of all possible distinct destinations, with at most one layover, departing from the base airports of airlines from Germany, Spain or Canada that are part of the “OneWorld” alliance .”

I am seeing this question prompt, and I also quoted it in my first post.

The “that are part of the OneWorld alliance” does not apply to the destinations. Or the routes. It applies to the base airports. Which can service many other airlines.

Translated to an algorithm, the question, as worded currently, boils down to:

  • find the airlines that are part of the OneWorld alliance
  • filter those airlines to only include those from Germany / Spain / Canada
  • find the base airport of each of those airlines

And then

  • for each of the airports listed above, find all of the destinations that can be reached with at most one hop

The way the question is worded, there is no restriction on airlines for that last step. Only for the first step of the algorithm.

The question should maybe be worded like this instead (I emboldened what I added):

“Find the list of all possible distinct destinations, using airlines from the “OneWorld” alliance, with at most one layover, departing from the base airports of airlines from Germany, Spain or Canada that are part of the “OneWorld” alliance.”

The repetition is awkward but needed.

Anyway, I don’t wish to argue this point to oblivion. I am just reporting imprecise language in the question which when translated into a program means a different output - and different correct answer, at least in my opinion.

You can close this thread.

I wish you a good day

Best,

Eliott

1 Like

Hi @Eliott_Coyac,

Thanks so much for your detailed answer. Sorry, I’m being a bit slow here. You’re totally right I just didn’t see it on my first few passes of your post, and your latest answer was very helpful. We’re working on replacing this aggregation course with new material at the moment so this issue should be alleviated soon.

I apologize for any frustration that this conversation has caused. Given your keen eye for detail, could I possibly recruit you to be a beta tester for our new course in the coming month? I’ll send you a private message about it, if that’s o.k.

Thanks again for reporting this issue.

3 Likes

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.