Merging (5)
Analysis (counting copies):
Let n1 and n2 be the lengths of a1 and a2.Let n = n1 + n2.
Each component of a1 is copied once, and each component of a2 is copied once.
No. of copies = n1 + n2 = n
Time complexity is O(n).
Diapositive précédente
Diapositive suivante
Revenir à la première diapositive
Afficher la version graphique