1
edit
Changes
→Help
=== Help ===
*<nowiki>'''Fardad, I Have a question,'''
*: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 linked list... which is after data3 on my above example... right, then why we are adding a Node from tail (ie. between data1 and NULL) of the linked list...?? if the adding on tail is right then, why we are removing from other side i mean.. head??? both process suppose 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 head, here is my code...--[[User:Tvirutthasalam|Tvirutthasalam]] 19:08, 23 February 2012 (EST)
<pre/nowiki>void Queue::add** got the answer from Chris' notes. Actually, a queue operates on a first in, first out principle (int valFIFO){ _head = new Node(val, _head);}</pre>
=== Resources ===