Dashboard Temp Share Shortlinks Frames API

HTMLify

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

    /**
     * @param Integer $num
     * @return String
     */
    function toHex($num) {
        // Handle two's complement for negative numbers
        $num = $num & 0xFFFFFFFF;
        return dechex($num);
    }
}