write a program for finding the union of two integer array
in java?
Answer Posted / satish kumar
void union(int x[],int y[])
{
int n=x.length + y.length ;
int z[]=new int[n];
int p=x.length;
for(int i=0;i<x.length;i++)
{
z[i]=x[i];
}
int j=0;
for(int i=0;i<y.length;i++)
{
for(j=0;j<x.length;j++)
{
if(y[i]!=z[j])
{
continue;
}
else
{
if(y[i]==z[j])
break;
}
}
if(j==x.length)
z[p++]=y[i];
}
| Is This Answer Correct ? | 32 Yes | 24 No |
Post New Answer View All Answers
WHAT IS THE MEANING OF CONSTANT ...EXEEDS LENGTH LIMIT WHILE COPYING FROM PS FILE TO KSDS
Write a program to find duplicate number from array in minimum time complexity.
how to convert infix expression to prefix expression?
which book we learned this mantis? how many version are realsed this mantis upto now?
Hello...has anyone interviewed with Information Management Services(IMS)located in Silver Spring MD??If yes,what can you share about the programming test and the analytical test?
code for connection from windows forms to sql server
Busy waiting is a method whereas a taskwaits for a given event by continiously checking for an event to occur. What is the main problem with this approach
Difference between debugging, running, executing of an application
what is programmable BIST in today ic design
What is easiest way to get the PL/i compiler,I didn't have found the compiler in my library. Is there any extra cost if we want to access the PL/1 programs?Actually we r having Mainframe rented training Ids
Difference between views and index in sas programming
hi i m deepak my shedule for NIC pi is 17 Apr please contact me if anybody has interview on same day or give me some idea who have faced
what are all the validation we need to perform in data stage?
can any one suggestion me present which course(except java,.net) has huge demand in the market?
what are the advantages of sap on other software ?