FREE C PROGRAMS

Data Structures and C Programming

  DATA STRUCTURES USING C

 HOME PAGE

Data Structures Interview Questions

Pg : 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14

"Programming is an art form that fights back"

Data Structures Interview Questions - Page 9

On which principle does stack work?

Ans: FIFO

AVL trees have a faster __________

Ans: Retrieval

Tell how to check whether a linked list is circular ?


Create two pointers, each set to the start of the list. Update each as follows:

while (pointer1)

{
pointer1 = pointer1->next;
pointer2 = pointer2->next; if (pointer2) pointer2=pointer2->next;
if (pointer1 == pointer2)

? ? ? ? ? ? {
print (\”circular\n\”);
}
}
 

---------------------------------------------------------------------------------------