233 views
1 votes
1 votes
What is the time complexity of adding an element at the front of a circular linked list ?

O(n) or theta(n) ? How to find whether it is O or theta ?

1 Answer

0 votes
0 votes
O(n)

 Becuase it will check start from head  till node next--> head

Related questions

1 votes
1 votes
1 answer
2
jugnu1337 asked Apr 20, 2022
436 views
what is T.C. of this code: for(i=1;i<=n;i++) for(j=1;j<=n;j=j+i) x=x+1;
1 votes
1 votes
1 answer
3
0 votes
0 votes
1 answer
4
iarnav asked Jun 12, 2018
840 views
Given an sorted array in descending order, what will be the time complexity to delete the minimum element from this array?