Explain how to implement doubly linked lists using only one pointer value*np[x *] per item instead of the usual two (next and prev). Assume that all pointer values can be interpreted as k-bit integers, and define* np[x] to be np[x] = next[x] XOR prev[x],* the k-bit “exclusive-or” of next[x] and prev[x]. (The value NIL is represented by 0.) Be sure to describe what information is needed to access the head of the list. Show how to implement the SEARCH, INSERT, and DELETE operations on such a list. Also show how to reverse such a list in O(1) time.
This is the Question in the Book "*Introduction To Algorithms" *By CORMEN ( MIT Press ) Page Number : 209 , Problem No: 10.2-8. Thanks in Advance. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/Uj1E8KXljAQJ. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.