leninkumar koppoju
46 followers
46 followers
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...
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 ) {       ...
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. ...
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...
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...
Post has attachment
Prime Number
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 (...