Given an array A[n+m] of n+m numbers, where A[1] ... A[n] is
sorted and A[n+1] ... A[n+m] is
sorted. Design a linear time algorithm to obtain A[1...n+m]
sorted using only O(1) extra space.
Time Complexity of your algorithm should be O(n) and Space
Complexity O(1).


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More C Interview Questions

How can I find out if there are characters available for reading?

0 Answers  


What is c variable?

0 Answers  


What is binary tree in c?

0 Answers  


Find the second largest element in an array with minimum no of comparisons and give the minimum no of comparisons needed on an array of size N to do the same.

0 Answers   Amazon,


If a five digit number is input through the keyboard, write a program to print a new number by adding one to each of its digits.For example if the number that is input is 12391 then the output should be displayed as 23402

0 Answers  






number of times a digit is present in a number

0 Answers  


When should structures be passed by values or by references?

0 Answers   Adobe,


What are the types of type qualifiers in c?

0 Answers  


I have an array of 100 elements. Each element contains some text. i want to: append a star character to the end of every fifth element remove every second character from every tenth element, and… add a line feed (ascii 10) after the 30th character of every array element whose length is greater than 30 characters.

1 Answers  


hi friends how r u as soon in satyam my interview is start but i m very confusued ta wat i do plz help me frndz wat can i do plz tell me some question and answers related with "C" which r asked in the interview .

0 Answers   Aegis, CDAC, Infosys,


#include<stdio.h> { printf("Hello"); } how compile time affects when we add additional header file <conio.h>.

0 Answers  


write a program for odd numbers?

15 Answers  


Categories