Skip to main content

Posts

Featured

PATTERN *1 121 12421 1248421*

public class Patern { public static void main(String[] args) { int i,j,k,space,s=8; for(i=1;i<32;i*=2) { for(space=s;space>0;space--) System.out.print(" "); System.out.print("1 "); for(j=2;j<=i;j*=2) { System.out.print(j+ " "); } j=j/2; for(k=j/2;k>=2;) { System.out.print(k+" "); k=k/2; } if(i>1) System.out.print("1 "); System.out.println(); s-=2; } } }

Latest posts

SELENIUM WAITS

Insertion sort

Merge Sort

Quick Sort

Find Duplicates Using HashSet

Simpson's One Third Rule

Remove Duplicate Elements From Array

Largest Smallest Number in an Array

Binary Search

Linear Search