Home > Back-end >  Linear table merging
Linear table merging

Time:09-17

Two order linear table data element type for the characters, according to the original of the two tables to generate a new sequential linear table, new table requires the original table include all the data elements, if need to make the most of the original table space to complete the operation, should adopt what kind of storage structure?

CodePudding user response:

Merge sort is

CodePudding user response:

Which don't have to create a new list, the two lists together again

CodePudding user response:

Comparing list save space, the efficiency will be higher, if the data will be given by shift or create a new space, should be two tables and a new space,
Suggest using linked list, from the space complexity and time complexity are appropriate,
  • Related