Profile cover photo
Profile photo
leninkumar koppoju
46 followers
46 followers
About
Posts

Post has attachment
Reverse A String using Recursion
public class ReverseAString {        public static void main(String[] args ) {              ReverseAString ras = new ReverseAString();              System. out .println( ras .reverseString( "checkit" ));        }        public String reverseString(String in...
Add a comment...

Post has attachment
CyclicRotation
import java.util.Arrays; import java.util.stream.Collectors; public class CyclicRotation
{      public static void main(String[] args ) {           print ( solution (3,
1, 2, 3, 4, 5));      }      public static int [] solution( int k , int ... a ) {       ...
Add a comment...

Post has attachment
Binary Gap
A  binary gap  within a positive integer N is any maximal sequence of consecutive zeros that is surrounded by ones at both ends in the binary representation of N. For example, number 9 has binary representation  1001  and contains a binary gap of length 2. ...
Add a comment...

Post has attachment
Wonder-Land Number
This a way to generate the
wonderland number. It has six digits. If you multiply it by 2,3,4,5, or
6, the resulting number has all the same digits in at as the original number. The only difference is the
position that they are in. Source: https://github.com...
Add a comment...

Post has attachment
Balanced Parenthesis
A program to determine if the parentheses
(), the brackets [], and the braces {}, in a string are balanced. For example: {{)(}} is not balanced because )
comes before ( ({)} is not balanced because) is
not balanced between {} and similarly the { is not bala...
Add a comment...

Post has attachment
Prime Number
import java.util.stream.IntStream; public class PrimeNumber {           public static void main(String[] args ) {           PrimeNumber primeNumber = new PrimeNumber();           System. out .println( primeNumber .isPrime(2));           System. out .println...
Add a comment...

Post has attachment
Minimum Perimeter of Rectangle
import java.util.stream.Stream; public class MinimumRectanglePerimeter {      public static void main(String[] args ) {           System. out .println( perimeter (30));      }      public static int perimeter( int area ) {           return Stream. iterate (...
Add a comment...

Post has attachment
Count Coins
There are four types of common coins in US currency:   quarters (25 cents)   dimes (10 cents)   nickels (5 cents)   pennies (1 cent)   There are 6 ways to make change for 15 cents:   A dime and a nickel;   A dime and 5 pennies;   3 nickels;   2 nickels and ...
Add a comment...

Post has attachment
Calculate Statistics
This task will process a sequence of integer numbers to determine the following statistics:     o) minimum value     o) maximum value     o) number of elements in the sequence     o) average value For example: [6, 9, 15, -2, 92, 11]     o) minimum value = -...
Add a comment...

Post has attachment
Combined Number using Java 8
Following is  a function, accepting a list of non negative integers, and returning their largest possible combined number as a string. For example given [50, 2, 1, 9] it returns "95021"    (9 + 50 + 2 + 1) given [5, 50, 56]   it returns "56550"    (56 + 5 +...
Add a comment...
Wait while more posts are being loaded