856 views
0 0 votes
why deleteQueue() is taking O(1) even if it has to traverse whole linked list ???

whereas deleteStack() has time complexity of O(n) ??

can anyone please explain it ?

Please log in or register to answer this question.

Position:
Show:

Related questions

2 2 votes
1 answers 1 answer
10.7k
10.7k views
rahul sharma 5 asked Sep 28, 2017
10,733 views
if we implement queue using singly linked list then how juch time enqueue enqueue and dequeue will take ?
0 0 votes
1 1 answer
1.1k
1.1k views
Aghori asked Aug 18, 2017
1,061 views
Why the following code is not giving desired results? The code simple push & appends the nodes in the linked list.#include <stdio.h #include <stdlib.h struct Node{ int it...
3 3 votes
4 4 answers
59.4k
59.4k views
Shubhanshu asked Jun 10, 2017
59,392 views
Which of the following is true about linked list implementation of queue?(a) In push operation, if new nodes are inserted at the beginning of linked list, then in pop ope...
0 0 votes
0 0 answers
948
948 views
Lakshman Bhaiya asked Oct 26, 2018
948 views
Consider the following function:Find(Element Type X,List L) { Position Prev_Pos,XPos; Prev_Pos=Find Previous(X,L); if(Prev_Pos ->Next!=NULL) /* found */ ...