Tag: pow
-
How to find the nth Fibonacci number in the series?
This is the complete solution to find the nth Fibonacci number in the series. This solution is designed to solve the problem using an interface, super class and three derived classes implementing the interface.
-
How to check whether a String is eligible Palindrome or not?
This is the complete solution to check whether a given String is eligible for a Palindrome or not. This solution is designed to solve the problem using an interface, super class and three derived classes implementing the interface.
-
How to check whether a given number is ArmStrong number or not?
This is the complete solution to check whether a given number is ArmStrong number or not. This solution is designed to solve the problem using an interface, super class and three derived classes implementing the interface.
-
How to check whether a number is Disarium or not using stream
This is the second solution to check the number for Disarium. This solution uses IntStream, reduce methods of Stream. The Disarium number is say for a given number 351, evaluate the powers from the left side as power (3 * 1) + power (5 * 2) + power (1 *3) , the sum of all…
-
How to check whether a number is Disarium or not
This is the second solution to check the number for Disarium. This solution contains the core logic to evaluate the sum of powers of all digits in descending order of the length of number. The Disarium number is say for a given number 351, evaluate the powers from the left side as power (3 *…
-
How to check whether a number is Armstrong number or not
This is the first solution to check the number for Armstrong. This solution uses String class, and a couple of Character functions to evaluate the sum of the cubes of each digit in a given number. The Armstrong number is say for a given number 153, evaluate the powers of cubes from any side as…
-
How to check whether a number is Disarium or not
This is the first solution to check the number for Disarium. This solution uses String class, and a couple of Character functions to evaluate the sum of powers. The Disarium number is say for a given number 351, evaluate the powers from the left side as power (3 * 1) + power (5 * 2)…
