Monday, May 24, 2010

Using a circular doubly linked list below, give the expression corresponding to each of the following descript

Node 1 -%26gt; Node2 -%26gt; Node3 -%26gt; Node4 -%26gt; Node5


%26lt;- %26lt;- %26lt;- %26lt;-





A is pointing to Node1, B to Node2, and C to Node5.





For example the info value of node 1, referenced from reference A would be A.getInfo().





a. The info value of node 1, referenced from reference C?





b The link value of node 2, referenced from reference A?





C The back value of node 1, referenced from reference A?





Note: Node1 circles back to Node 5 and vs versa.

Using a circular doubly linked list below, give the expression corresponding to each of the following descript
Note: try it yourself before you ask for help.
Reply:Circular-Doubly-linked list?... oh...


then, each node has two pointers of (prev,next) . Yeah?


well, then





a. C-%26gt;next would be A, so we can solve it by...


C-%26gt;next-%26gt;getinfo();





b. A-%26gt;next-%26gt;getinfo();


Oh, here, what does it meant by %26lt;link value of node2%26gt;?


May i get it by the info of node 2?,If you don't mind, then it is possible...





c. A-%26gt;prev is C, so


A-%26gt;prev-%26gt;getinfo();








thank you reading my poor opinion...


No comments:

Post a Comment