Jump to content

hoomey

New Members
  • Posts

    1
  • Joined

  • Last visited

hoomey's Achievements

Lepton

Lepton (1/13)

0

Reputation

  1. Please someone write this algorithm in Python please. Divide and conquer N runners participate in a 100-meter sprinting competition. All runners are seeded from number 1 to number n. After all the running heats are over, the competition results are determined by comparing the time. The sprinter with the fastest time is ranked 1st and the sprinter with the slowest time ranked nth. Write an algorithm that computes the number of sprinter pairs that have the competition results opposite to the pairs’ seed numbers. The running time of the algorithm must be O(nlgn). Input: list of seed numbers according to the sprinter results, from the fastest to the slowest. Output: the number of sprinter pairs that get the results opposite to the seeding.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.