recategorized by
369 views

1 Answer

0 votes
0 votes
considering that invert means interchanging two nodes

in both singly and doubly we use temp node to perform so basically its the same

difference comes in the way we reach that location

in singly wehave to traverse from the begining

and in doubly can be traversed backwards

therefore i feel in this case too doubly is more efficient

correct me if i am wrong

Related questions

0 votes
0 votes
1 answer
2
0 votes
0 votes
2 answers
3
Mr_22B asked Dec 10, 2017
2,285 views
What is the time complexity to insert a new Node in a singly circular linked list at Starting ? (Number of nodes in list = N)A. O(1)B. O(N)