1-Line JavaScript Code Solution


  • 0
    Z

    /**

    • @param {number} num
    • @return {string}
      */
      var toHex = function(num) {
      return num >= 0 ? num.toString(16) : (4294967296 + num).toString(16);
      };

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.