GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Programming  >  C

 Print  |  
Question:  write a code for implementation of doubly linked list with use of single pointer in each node



January 01, 2006 11:10:56 #2
 Jags   Member Since: November 2005    Total Comments: 1 

RE: write a code for implementation of doubly linked l...
 
Store an extra integer which stores the X-or value of addresses of previous node and the next node. Since you have the option of storing one pointer, you can easily retrieve the address of the other node {either previous or next} by performing X-or between the stored integer and the node address (stored one).
     

 

Back To Question