Ad
  • Custom User Avatar

    In this case, however, each row corresponds to its input, i.e. if the first input values are divisor = 2, bound = 7, then the first row of result table must have 6 as a res value.

    Sorting a table with just res values may validate incorrect solutions sometimes, because despite having different answers for each row, it can actually be sorted as well as the expected table so that they're equal.

    The solution is to add divisor and bound to the result table, BUT it will invalidate 2K+ solutions which work only with the one column...

  • Custom User Avatar

    Relational databases assume that the order of rows in the resulting set doesn't matter, BUT in this exercise different rows order leads to unacceptable solution. It looks like we need a specific order clause to solve this misconception