Time complexity/performance of insertion operation for a Queue implementation

Tuesday, July 1, 2014

What is the performance of the insertion operation for a Queue implemented as:


(a) an array, with the items in unsorted order


(b) an array, with the items in sorted order


(c) a linked list, with the items in unsorted order.


For each operation, and each implementation, give the performance in Big Oh notation and explain enough of the algorithm to justify your answer. (e.g. it takes O(n) times because in the worse case.... the algorithm does such and such....).


Please explain in detail, it'll help me out a lot!







http://ift.tt/1qiJ7Oo