The Gateway to Computer Science Excellence
+1 vote
If the head of a Linked List is pointing to $k$ th element, then how will you get the elements before $k$ th element?
in DS by
edited by | 111 views
In case of single linked list we can't get that elements..

The answer is given that Use memory efficient Linked lists [XOR Linked Lists]

Yes, I will try to read it, this concept is important for GATE?
As of now, i think no such questions have been asked..But still u can read about it.
The traversal of xor list is possible if we know address of the previous or later node. How is xor list sufficient to get the previous nodes till k.Xor list can traverse in both directions but  here how can we traverse backward if we don't know the previous address?

Please log in or register to answer this question.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
52,345 questions
60,517 answers
95,368 users