Welcome Message

Hi, welcome to my website. This is a place where you can get all the questions, puzzles, algorithms asked in interviews and their solutions. Feel free to contact me if you have any queries / suggestions and please leave your valuable comments.. Thanks for visiting -Pragya.

April 15, 2009

Progress Software ques (1st round)

Progress Software : 

1.  Given a stack: 
push(A)
push(B)
push(C)
pop()
pop()
Peek()
what would be the output ?

2. What would be the performance of a hashmap or a hash table if all the keys map to same value.
A:  Very poor as one of the basic reqmt of hashmap is that all the keys should map to a unique value.

3. class A{
method m1()
}
class B extends A{
method m1()
}

A a = new B();
Which method wud be called ?
Ans : B.m1()

4. What would be the output :
sysout(10+ "10");

Ans :1010

5. sysout(list);
where list is a string array of 3 
o/p
Ans : Address of list.

6. Puzzle
3 containers
1 contains apple
1 contains oranges
1 contains mixture

label on all containers are wrong.
in hw many picks wud u find out which one contains wot ?
Ans : 1
pick one frm mixture.
we are sure tht it does not contain mixture.
if we get apple, it must contain apple.
Now, the one which has orange label id will surely not contain oranges and will not contain apples either.So it must contain 
mixture.
thus the third one must contain oranges.

April 7, 2009

3 Magics

MAGIC #1


An Indian found that nobody can create a FOLDER anywhere on the Computer
which can be named as "CON". This is something funny and inexplicable. At
Microsoft the whole Team, couldn't answer why this happened!
TRY IT NOW, IT WILL NOT CREATE A "CON" FOLDER




MAGIC #2



For those of you using Windows, do the following:

1.) Open an empty notepad file
2.) Type "Bush hid the facts" (without the quotes)
3.) Save it as whatever you want.
4.) Close it, and re-open it.

Noticed the weird bug? No one can explain!




MAGIC #3



Again this is something funny and can't be explained. At Microsoft the
whole Team, including Bill Gates, couldn't answer why this happened!


It was discovered by a Brazilian. Try it out yourself.

Open Microsoft Word and type

=rand (200, 99)
And then press ENTER
And see the magic