Changes

Jump to: navigation, search

Weekly Schedule 20121 - OOP344

737 bytes added, 19:03, 23 February 2012
Help
=== Help ===
*'''Fardad,'''
*: data3 -> data2 -> data1 -> NULL
*:I was asking the same question in today's class... just want to get clear about adding a Node. On your example, you wrote, that removing a Node is happenning from _head of the link list... which is from data3 on my above example... right, then why we are adding a Node from tail (ie. between data1 and NULL) of the link list...?? Why we are adding on tail? if the adding on tail is right then, why we are removing from head??? If we get this type of question on test or exam, it will definetly cofuse me. Please correct me if I understand wrongly. Thanks! If the adding is happenning on had, here is my code...
<pre>
void Queue::add(int val){
_head = new Node(val, _head);
}
</pre>
=== Resources ===

Navigation menu