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.

No comments: