Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

time complexity of single and double link list

$
0
0

i am little confused over the time complexity of single and doubly link list operation.for a single link list deletion takes o(n) time which is clear since first we have to search and for the worst case it is o(n) but i have read somewhere on the net that for doubly link list its o(1) why? for that too we have to traverse whole list.. thanks in advance. reply soon :)


Viewing all articles
Browse latest Browse all 40121