Key-Lock matching
Problem: We have two arrays; one consists of locks, other, keys. We need to match those two arrays index by index. Every matching Key and Lock have the same value.
What we are asked to do; pick a Key in random; search Lock array for its match and sort it while searching. When you find the matching Lock, you sort Key array using that Lock value.