Tag: Length
-
How to reverse all the numbers at even positions in an array of integers
This is the first solution to reverse all the numbers at even positions. This solution modifies the same array. The resultant array has all the numbers reversed only even positions.
-
How to find length of long integer value using String class
This is the first solution to find the length of a given long integer value. This approach converts long integer to string and uses the length method.
-
How to find length of integer value using Integer class
This is the third solution to find the length of a given primitive int data type value. This approach uses Integer wrapper class to convert to string before using the length method.
-
How to find length of integer value using String class
This is the second solution to find the length of a given primitive int data type value. This approach converts int value to string, and then applies the length method.
-
How to find length of integer value using core logic
Look at the first solution to find the length of a given integer which is a primitive datatype. This approach is based on the core logic without using any built-in methods.
