1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
8090 [49]
3 years ago
11

Write a function merge that merges two lists into one, alternating elements from each list until the end of one of the lists has

been reached, then appending the remaining elements of the other list.
Computers and Technology
1 answer:
Anna007 [38]3 years ago
5 0

Explanation:

The program that merges two lists or two arrays is written below;

Code :

void main void

{

char [] arr1= {'1','2','3'};

char [] arr2= {'a','b','c','d','e'};

int l1= arr1.length;

int l2=arr2.length;

int l3=l1+l2;

char [] arr3=new char[l1+l2];

int i=0;

int j=0;

int k=0;

int m=0;

int r=0;

if(l1<l2)

   r=l1;

else

   r=l2;

while(m<r)

{

   arr3[k++]=arr1[i++];

   arr3[k++]=arr2[j++];

   m++;

}

while(k<l3)

{

   if(l1<l2)

       arr3[k++]=arr2[j++];

   else

       arr3[k++]=arr1[i++];

}

for(int n=0;n<l3;n++)

{

   System.out.print(arr3[n]+" ");

}

}

You might be interested in
What is the unit of measure ment to easure cpu speed
Hatshy [7]

Answer:

gigahertz (GHz )

Explanation:

A “cycle” is technically a pulse synchronized by an internal oscillator, but for our purposes, they're a basic unit that helps understand a CPU's speed

7 0
3 years ago
ZigBee is an 802.15.4 specification intended to be simpler to implement, and to operate at lower data rates over unlicensed freq
never [62]

Answer:

True

Explanation:

Solution

ZigBee uses unlicensed frequency bands but operate at slower speed or data rates.

ZigBee: This communication is particular designed for control and sensor networks on IEEE 802.15.4 requirement for wireless personal area networks (WPANs), and it is a outcome from Zigbee alliance.

This communication level defines physical and  (MAC) which is refereed to as the Media Access Control layers to manage many devices at low-data rates.

6 0
4 years ago
Conformity is the acceptance of culturally approved goals and the means for achieving these goals.
docker41 [41]

Answer:

The following statement is "True".

Explanation:

Conformity acceptance word divided into two parts that are Conformity and acceptance. Conformity stands for change in behavioral change or conviction. Or considered the stress of the party. and the acceptance stands for thinking and trusting across community standards.  behaving and believing along social lines.

In other words we can say that achieving cultural goals via channels that are culturally approved and utilizing traditionally unorthodox methods to achieve cultural goals.

6 0
3 years ago
Read 2 more answers
It is ok to sell services on Xbox in exchange for real-world money
Sati [7]
Is this a true or false question? If it is let me know and I can help! (:
6 0
4 years ago
Read 2 more answers
Charles Montesquieu believed that the
kakasveta [241]

Answer:

A. Make Laws

Explanation:

Montesquieu believed the ways to go about limiting the power of a monarch would be to split up power among 3 groups, Judicial, Legislative and Executive. The American Presidential system and Constitution used Montesquieu's writings as a foundation for their principles.

  1. Judicial Interprets laws
  2. Legislative Makes laws
  3. Executive Enforces Law

6 0
3 years ago
Read 2 more answers
Other questions:
  • Letm1, m2,···mnbe distinct numbers on the number line, in the increasing order. Your goalis to color all of them blue. You have
    9·1 answer
  • Litmus-type test strips are used to test coolant for freeze protection and ?
    12·1 answer
  • The appropriate length for an e-mail is about half the amount of text that will fit on an 8 1/2' by 11' page.
    11·2 answers
  • What activities are the most likely to infect your computer with a virus? Check all that apply
    11·2 answers
  • Mrs. Johnson is here today to receive an intercostal nerve block to mitigate the debilitating pain of her malignancy. Her cancer
    13·1 answer
  • Before his job interview, Shabnam took the time to carefully wash and iron his best khaki pants and a button-down shirt. He even
    15·2 answers
  • A large lens can be very heavy and can only be supported at the_______.
    13·1 answer
  • A company has four departments: A, B, C, and D. The number of IP addresses required by each department is 100, 60, 20, and 26 re
    5·1 answer
  • Help me to solve please​
    8·2 answers
  • Name:
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!