sse
BAN USER- 0of 0 votes
AnswersIn how many ways, 8 black and 8 white coins can be placed in 8x8 chess board.
- sse in United States| Report Duplicate | Flag | PURGE
Amazon Software Development Manager - 0of 0 votes
Answerswrite a function/procedure, it should detect and report all UN-USED FUNCTIONS (i.e functions are defined but not called) in a C++ class(i.e suppose you are developing a c++ editor for code compilation) -- MS bing
- sse in India| Report Duplicate | Flag | PURGE
Microsoft Algorithm - 0of 0 votes
AnswersWrite pseudo code for Optimal game stratagy:
- sse in United States
You have X amount with you, and 2N cards (N - winning cards, and N-loosing cards).
you have to play all the cards.
all cards are well shuffled, and one card is drawn randomly for each time.
if you pic one card means, next time you have to take one card from rest of the cards, i.e at last of the game you will left with one card.
If you bet 100 rupees,
If you got winning card ===> then you will get 200 rupees,
If you got a loosing card ====> then you will loose all your betting amount.i.e 100 rupees in this case.
You need to play all the cards. (I solved it.)
He asked me to solve it, with card replacement, i.e every time one card is drawn from 2N CARDS.| Report Duplicate | Flag | PURGE
Microsoft Developer Program Engineer Algorithm - 0of 0 votes
AnswerBy using core dump file, how do you traverse a linked list.
- sse in United States
i.e you got a core dump file while printing the linked list with head pointer. suppose at node number 40000,
each node has an unique identification number(lets say id starts with 1 to 100000, i.e 1 lac nodes are there in the list), I want to see the node content with identification number 122.
You have only coredump file and sorce code file with you. You are working with core dump file now.| Report Duplicate | Flag | PURGE
Adobe Applications Developer Algorithm
Proposed solution:
1. create a MAP as <function_name_with_signature, booleanFlag>
2. crate a set for private and protected functions.
3. create a MAP for un-known status fuctions i.e function is called or not we dont know..
UN-KNOWN MAP <fucntion_name, list of fucntions called in this function>
Algo:
1.parse every funtion, if it calls any other function, then set flag of the corresponding called function. and add the main function to un-known status fucntion set.
ex: fun1 () { fun2();}
then fun2's flag will be set to true.
and fun1 will be added to UNKNOWN map.
2. for any call to member function in the fucntion definition is found, check in unknown map first, if it is found remove it from UNKNOW.
interviewer is not happy with my answer.......
please post your comments.....I am curious abt answer.
sorry bro, my intension is not to irritate/ demotivate any one.
- sse July 15, 2012I am so curious to know the answer.
this is the qn. asked in 4th round for 6+ yr. experienced.