569 views

2 Answers

0 votes
0 votes

 

if we insert a node in the middle of the list. then we have to traverse half of the list and it will take o(n) in best and worst case.

if we insert node at the starting of the node then it will take constant time

Related questions

0 votes
0 votes
1 answer
1
0 votes
0 votes
1 answer
2
DAWID15 asked Dec 22, 2022
529 views
Options:10, 12,14, 16, 18, 2020, 18, 16, 14, 12, 1012, 10, 16, 14, 20, 18NONE
0 votes
0 votes
0 answers
3
Vipin Rai asked Jan 5, 2019
188 views
0 votes
0 votes
0 answers
4
eyeamgj asked Oct 7, 2018
948 views
IN THE VIA HEAP LIST WHY IT IS O(LOGN) FOR SEARCHING??