Is insertion and deletion operation faster in rope than an array?

Is insertion and deletion operation faster in rope than an array?
A. True
B. False
 
Answer: a
Explanation: In order to perform the insertion on the rope data structure, the time complexity is O (log n). In order to perform the deletion on the rope data structure, the time complexity for worst case is O (log n). While for arrays the time complexity is O (n).
 

Tìm kiếm

Back
Top