merge two sorted arrays without redundancy

Merge two sorted arrays and sort them in order as specified at runtime. The two arrays may share common entries between them, but the resultant array must not have duplicates.
Please define this with space and time complexity.


  1. Thanks for the problem. I am working on it. I will post the program soon.

  2. I have changed the problem a little bit as,

    Each inserted array may have different order, that is, it is not always that will be of the same order.

    If they are not ordered, the program must exit.

    Then the merged array will be in the ordered given by the user.

    Ans obviously the resultant array will not have any duplicate entries.

    Well, I half way done to this, but I think I will need more time. By the way, I do not know what "Define this with time and space complexity" means?

  3. @Tanmay the last statement means what is time and space complexity of your program.time complexity should be o(n).


Post a Comment

Popular posts from this blog