subject

Let a and b be two vector. i. e. a and b are two vectors, of possibly different sizes, containing integers. Further assume that in both a and b the integers are sorted in ascending order.
1. Write a function:
vector merge( vector a, vector b)
that will merge the two vectors into one new one and return the merged vector.
By merge we mean that the resulting vector should have all the elements from a and b, and all its elements should be in ascending order.
For example:
a: 2,4,6,8
b: 1,3,7,10,13
the merge will be: 1,2,3,4,6,7,8,10,13
Do this in two ways. In way 1 you cannot use any sorting function. In way 2 you must.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:20
This problem has been solved! see the answeran evil king has a cellar containing n bottles of expensive wine, and his guards have just caught a spy trying to poison the king’s wine. fortunately, the guards caught the spy after he succeeded in poisoning only one bottle. unfortunately, they don’t know which one. to make matters worse, the poison the spy used was very deadly; just one drop diluted even a billion to one will still kill someone. even so, the poison works slowly; it takes a full month for the person to die. design a scheme that allows the evil king to determine exactly which one of his wine bottles was poisoned in just one month’s time while expending at most o(logn) of his taste testers.you are not allowed to use n testers, one for each bottle, and see which one tester dies after 30 days.(no pseudocode needed. just answer in words, how many testers you use, how you use them and why you correctly identify the poisoned bottle in 30 days)
Answers: 2
question
Computers and Technology, 22.06.2019 01:00
Duplicating objects creates copies that a. move differently than the original object b. erase the original object c. look and act like the original object d. add events to a game
Answers: 1
question
Computers and Technology, 23.06.2019 16:10
What is the ooh? a. omaha occupation handbook b. online occupational c. occupations online d. occupational outlook handbook select the best answer from the choices provided
Answers: 3
question
Computers and Technology, 24.06.2019 07:00
Into what form does the barcode reader convert individual bar patterns?
Answers: 1
You know the right answer?
Let a and b be two vector. i. e. a and b are two vectors, of possibly different sizes, containing in...
Questions
question
Mathematics, 26.08.2019 13:10
Questions on the website: 13722360