Dashboard Temp Share Shortlinks Frames API

HTMLify

Day 109
Views: 4 | Author: djdj
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
class Solution {

    /**
     * @param String[] $names
     * @param Integer[] $heights
     * @return String[]
     */
    function sortPeople($names, $heights) {
        $combined = array_combine($heights, $names);
        krsort($combined);
        $result = array_values($combined);
        return $result;
    }
}