One line code Java Solution


  • 0
    L

    public class Solution {
    public String convertToBase7(int num) {
    return Integer.valueOf(num).toString(num,7);
    }
    }


Log in to reply
 

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