MCPcopy Create free account
hub / github.com/codedecks-in/LeetCode-Solutions / length

Method length

Java/Armstrong-Number.java:26–35  ·  view source on GitHub ↗
(int N)

Source from the content-addressed store, hash-verified

24 */
25
26 public static int length(int N) {
27 int length = 0;
28
29 while (N != 0) {
30 N = N / 10;
31 length++;
32 }
33
34 return length;
35 }
36
37 public static boolean isArmstrongNumber(int N, int k) {
38 long powerSum = 0;

Callers 15

removeDuplicatesMethod · 0.80
detectCapitalUseMethod · 0.80
romanToNumberMethod · 0.80
reverseMethod · 0.80
firstUniqCharMethod · 0.80
isPalindromeMethod · 0.80
detectCapitalUseMethod · 0.80
addTwoNumbersMethod · 0.80
twoSumMethod · 0.80
isAnagramUsingSortingMethod · 0.80

Calls

no outgoing calls

Tested by 1