Tuesday, May 17, 2011
Merge Sort
public class arraydemomergesort
{
public static void mergesort(int x[], int y[])
{
int i,j=0,z[];
z=new int [x.length+y.length];
for(i=0;i
=0;i--)
{
System.out.println(z[i]);
}
}
public static void main(String[] args)
{
mergesort(new int[] {44,22,77,55,22},new int[]{22,59,64,77});
}
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment