ARRAY_IS_EMPTY, DATA_TYPE_NOT_SUPPORTED_YET, DECIMAL_RADIX, DELIMITER_COMMA, ELEMENT_NOT_FOUND, LIST_IS_EMPTY, OPERATION_NOT_SUPPORTED_YET
Modifier and Type | Method and Description |
---|---|
static boolean |
haveSameDigitsAndLength(int a,
int b) |
static boolean |
haveSameDigitsAndLengthPrimes(int a,
int b) |
static int |
hcf(int a,
int b)
O(log(n)) solution, based on the works of Euclid and Aryabhatta.
|
static boolean |
isArmstrongNumber(int number)
|
static boolean |
isNeonNumber(int number)
|
static boolean |
isPalindrome(int number)
|
static boolean |
isPrimeNumber(long n) |
static int |
midPoint(int start,
int end) |
static int |
orderOf(int n) |
static java.util.List<java.lang.Integer> |
printArmstrongNumbers(int upperBound) |
static int |
raiseTo(int n,
int p) |
public static int midPoint(int start, int end)
public static int hcf(int a, int b)
a
- integerb
- integerpublic static boolean isPrimeNumber(long n)
public static boolean isArmstrongNumber(int number)
number
- inputpublic static int orderOf(int n)
public static int raiseTo(int n, int p)
public static boolean isNeonNumber(int number)
number
- inputpublic static boolean haveSameDigitsAndLengthPrimes(int a, int b)
a
- 32-bit unsigned integerb
- 32-bit unsigned integerpublic static boolean haveSameDigitsAndLength(int a, int b)
public static boolean isPalindrome(int number)
number
- inputpublic static java.util.List<java.lang.Integer> printArmstrongNumbers(int upperBound) throws java.lang.InterruptedException
java.lang.InterruptedException