Question
PLEASE DO NOT COPY AND PASTE FROM A PREVIOUS POST. I WILL THUMBS DOWN AND REPORT YOUR ANSWER! I AM SIMPLY LOOKING FOR A DIFFERENT
do code in java please:
Given two, sorted, integer arrays, create a new array equal to the combined size of the two arrays, containing all the values of the initial two arrays in sorted order.
Input Format
One integer n representing the size of the first array, followed by n integers: the values of the first array.
Another integer m representing the size of the second array, followed by m integers: the values of the second array.
Constraints
The values of m and n (the sizes of the two arrays to be merged) will be between 1 and 1000
The arrays will contain valid java integer values.
Output Format
display the values of the new array separated by single spaces
Sample Input 0
510 21 35 43 568 18 22 24 29 31 48 49 55Sample Output 0
10 18 21 22 24 29 31 35 43 48 49 55 56-----------------------------------------------------------------------------
import java.io.*; import java.util.*;
public class Solution {
public static void main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ } }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started