Tuesday, July 27, 2010

cisco interview

1. how to find Intersaction node for two link list
2. how to store one bit data for large number of entries..

Wednesday, July 21, 2010

Charles de Gaulle Airport (CDG) to Paris by Train | Paris by Train

Charles de Gaulle Airport (CDG) to Paris by Train | Paris by Train: "A�roport Charles de Gaulle 1” station two minutes later, and then reaches Gare du Nord in Paris"

Thursday, July 15, 2010

Interview at Cisco

1. How sunetting helps in routing?
2. How to detect memory corruption

Saturday, July 10, 2010

Thursday, July 1, 2010

puzzel

You’re standing in front of a 100 story building with two identical bowling balls. You’ve been tasked with testing the bowling balls’ resilience. The building has a stairwell with a window at each story from which you can (conveniently) drop bowling balls.

To test the bowling balls you need to find the first floor at which they break. It might be the 100th floor or it might be the 50th floor, but if it breaks somewhere in the middle you know it will break at every floor above.

Devise an algorithm which guarantees you’ll find the first floor at which one of your bowling balls will break. You’re graded on your algorithm’s worst-case running time.

Thursday, June 24, 2010

Wednesday, June 23, 2010

How gdb and ioctl works

1. How gdb breakpoint works

(http://www.delorie.com/gnu/docs/gdb/gdbint_toc.html#SEC_Contents : GDB INTERNALS)

The basic theory is that GDB will replace a program instruction with a trap, illegal divide, or some other instruction that will cause an exception, and then when it's encountered, GDB will take the exception and stop the program. When the user says to continue, GDB will restore the original instruction, single-step, re-insert the trap, and continue on.

Since it literally overwrites the program being tested, the program area must be writable, so this technique won't work on programs in ROM. It can also distort the behavior of programs that examine themselves, although such a situation would be highly unusual.


2. How IOCTL works