Update : This puzzle is now solved
I consider this to be one of the more silly puzzle questions :p
Question
What is the value of this multiplication :
(x-a)(x-b)(x-c).....(x-z)
Answer
As rightly pointed out by Ajay and Kalpana, the answer is "zero".
The reason being, x-x = 0
Friday, May 28, 2010
Thursday, May 20, 2010
Delete any node in the middle of a linked list
Question
Given a pointer to a node in the middle of a linked list, how will you delete the present node ?
Answer
The trick is in using simple pointer tricks. The "present node" should now point to the "next node". Make sure you delete the data in the "present node"
Given a pointer to a node in the middle of a linked list, how will you delete the present node ?
Answer
The trick is in using simple pointer tricks. The "present node" should now point to the "next node". Make sure you delete the data in the "present node"
Subscribe to:
Comments (Atom)