Open main menu

CDOT Wiki β

Changes

Weekly Schedule 20121 - OOP344

105 bytes added, 20:08, 23 February 2012
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???... both process supposed to happen from same place... right? 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 hadhead, here is my code...--[[User:Tvirutthasalam|Tvirutthasalam]] 19:08, 23 February 2012 (EST)
<pre>
void Queue::add(int val){