





















































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!






















































[End of step 2 loop]
Q.1 What is the time complexity of Traversing operation in single linked list? A.O(1) B.O(n^2) C.O(n^3) D.O(n)
Q.2 What is the time complexity of Searching operation in single linked list? A.O(1) B.O(n^2) C.O(n^3) D.O(n)
info next list info next info next 3 8 info next p (^) 6
null
Adding an Element to the front of a Linked List 5 info next info next info next 3 8 info next p 6 list next(p) = list null
Adding an Element to the front of a Linked List 5 info next info next info next 3 8 info next list (^) 6 null
Inserting after a given node location insLOC(info, link, Start, avail, loc, item) This algo. inserts ITEM so that ITEM follows node with location Loc or inserts ITEM as first node when Loc=NULL
1. [Overflow?] If Avail == NULL, then Write: Overflow and Exit 2. [Remove first node from avail list] Set New = Avail and Avail = Availlink
Q.4 What is the time complexity of Insertion operation(at beg, at middle and at end) in single linked list? A.O(1) B.O(n^2) C.O(n^3) D.O(n)
Removing an Element from the front of a Linked List 5 info next info next info next 3 8 info next list (^) 6 null
Removing an Element from the front of a Linked List 5 info next info next info next 3 8 info next 6 list p p = list null