← Questions

Research OA: best value ratio, shuttle trips and grid commands

0
MetaCodingLast asked Mar 2026

A multi-part online assessment.

  1. Given ratings and prices, return the index with the highest rating-to-price ratio, choosing the smaller index on ties. Compare the fractions exactly, without floating point.
  2. A traveller must make a number of round trips between A and B. Departure times from A to B and from B to A are given as sorted lists. Starting at time 0 and always taking the first departure not earlier than the current time, when are the trips finished?
  3. Apply a list of commands (such as swapping rows or columns) to a 2D array in order and return the result.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding