+ Reply to Thread
Results 1 to 3 of 3

Thread: Array Merging

  1. #1
    TopGun Guest

    Array Merging

    You have one array of size M+N only M elements it has rest are empty, second array of size N, merge both of them in first array.

  2. #2
    Surfer is offline Senior Member
    Join Date
    Mar 2010
    Posts
    321
    Algorithm:
    Start comparing both the arrays from last, and filling up the array with size M+N from Last, till the 2nd arrays comes to the start.
    Now you have sorted larger array.

    Kindly let me know if this is not clear OR you need code for this.

  3. #3
    puspendra Guest
    question text needs to be corrected.. both array contains sorted element

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Merging of two binary trees
    By Surfer in forum Amazon
    Replies: 1
    Last Post: 2nd July 2010, 03:56

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts