520 views

1 Answer

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.

Related questions

1 votes
1 votes
1 answer
1
akash.dinkar12 asked Jun 30, 2019
620 views
Implement the dictionary operations $INSERT$, $DELETE$, and $SEARCH$ using singly linked, circular lists. What are the running times of your procedures?
1 votes
1 votes
2 answers
3
akash.dinkar12 asked Jun 30, 2019
405 views
Implement a queue by a singly linked list $L$. The operations of $ENQUEUE$ and $DEQUEUE$ should still take $O(1)$ time.
1 votes
1 votes
1 answer
4
akash.dinkar12 asked Jun 30, 2019
402 views
Implement a stack using a singly linked list $L$. The operations $PUSH$ and $POP$ should still take $O(1)$ time.