0 votes 0 votes Can you implement the dynamic-set operation $INSERT$ on a singly linked list in $O(1)$ time? How about $DELETE$? Algorithms cormen data-structures linked-list descriptive + – akash.dinkar12 asked Jun 30, 2019 akash.dinkar12 520 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
0 votes 0 votes insertion at O(1) time in singly linked-list is not possible unless we are using 2 pointers- one containing the starting address and another containing the last address. Similar goes for deletion. rish1602 answered Jan 25, 2021 rish1602 comment Share Follow See 1 comment See all 1 1 comment reply Lakshya herau commented Jun 17, 2021 reply Follow Share What if we insert element at starting then it is possible to insert item in O(1) time 0 votes 0 votes Please log in or register to add a comment.