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
How does a search engine use algorithms to provide search results?
Lyrx [107]

Answer:

By retrieving and ranking relevant search results

Explanation:

6 0
3 years ago
Read 2 more answers
What would you recommend for data segregation if using cloud software
Nadusha1986 [10]

Answer:

Hard very good hard drive

Explanation:

3 0
3 years ago
Read 2 more answers
List 1 reason people invest in Cryptocurrency
Katarina [22]

Answer:

The common reason to invest in cryptocurrency is the desire for a reliable, long-term store of value.

Explanation:

8 0
2 years ago
Modify the code below to do the following:
Kitty [74]

Answer:

The code is appropriately given below with comments for better understanding

Explanation:

#include <linux/init.h>

#include <linux/module.h>

#include <linux/kernel.h>

#include <linux/hash.h>

#include <linux/gcd.h>

#include <asm/param.h>

#include <linux/jiffies.h>

/* This function is called when the module is loaded. */

static int simple_init(void)

{

  printk(KERN_INFO "Loading Module\n");

  printk(KERN_INFO "These are the HZ: %d\n", HZ);

  printk(KERN_INFO "These are the jiffies: %lu\n", jiffies);

  printk(KERN_INFO "Golden Ratio is: %lu\n", GOLDEN_RATIO_PRIME);  

  return 0;

}

/* This function is called when the module is removed. */

static void simple_exit(void) {

  printk(KERN_INFO "Removing Module");

  unsigned long a = gcd(3300, 24);

  printk(KERN_INFO "Greatest Common Denominator between 3,300 and 24 is: %lu\n", a);

  printk(KERN_INFO "These are the jiffies: %lu\n", jiffies);

}

/* Macros for registering module entry and exit points. */

module_init( simple_init );

module_exit( simple_exit );

MODULE_LICENSE("GPL");

MODULE_DESCRIPTION("Simple Module");

MODULE_AUTHOR("SGG");

7 0
3 years ago
What are the six primary roles that information system play in organizations? How are information system used in each context
Nina [5.8K]

The primary roles that information system play in organizations are:

  • Decision making
  • Operational management
  • Customer interaction
  • Collaboration on teams
  • Strategic initiatives
  • Individual productivity
<h3>How are information system used in each context</h3>

The six main functions of information systems in an organization are as follows:

1. Operational management entails the creation, maintenance, and enhancement of the systems and procedures utilized by businesses to provide goods and services.

2. Customer relationship management: Maintaining positive and fruitful relationships with customers, clients, students, patients, taxpayers, and anyone who come to the business to purchase goods or services is essential for success. Effective customer relationships contribute to the success of the business.

3. Making decisions: Managers make decisions based on their judgment. Business intelligence is the information management system used to make choices using data from sources other than an organization's information systems.

4. Collaboration and teamwork: These two skills complement the new information systems that allow people to operate from anywhere at a certain moment. Regardless of their position or location, individuals can participate in online meetings and share documents and applications.

5. Developing a competitive edge: A firm can establish a competitive advantage by outperforming its rival company and utilizing information systems in development and implementation.

6. Increasing productivity of objection: Smart phone applications that mix voice calls with online surfing, contact databases, music, email, and games with software for minimizing repetitive tasks are tools that can help people increase productivity.

Learn more about information system from
brainly.com/question/14688347
#SPJ1

4 0
1 year ago
Other questions:
  • Think about a time when someone made a biased judgment about you or acted unfairly toward you because of your age, skin color, c
    6·1 answer
  • You would like to know how many cells contain data. Which function should you use? COUNT MIN SUM ABS
    14·1 answer
  • What are the features of a strong résumé? Check all that apply. The résumé is printed on regular printer paper. The résumé is we
    5·2 answers
  • The length property of the String object returns
    15·1 answer
  • Which of the following are some of the ways that the media influences consumers behavior
    9·1 answer
  • Jane is creating a slide that will have a large heading and number of bullet points below it. What slide format should she use?
    12·1 answer
  • The sun emits invisible _____&gt; A) electromagnetic waves B) Waves C) Radiation D) Wavelength E) Ultraviolet Light
    8·1 answer
  • Please hurry
    15·2 answers
  • How to Calculate the area of a rectangle in python
    13·2 answers
  • How to beat level 50 in give up robot 2
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!