bobbysanders007
BAN USER- 0of 0 votes
AnswersHow will you return
int
and
char
from a function in C?
- bobbysanders007 in United States| Report Duplicate | Flag | PURGE
C - 0of 0 votes
AnswersThere are 1000 tokens numbered as 1001-2000. Two functions allocate and release the tokens and their signatures are as follows, write their implementation
- bobbysanders007 in United Statesint alloc_token() { //returns token number } void free_token(int token) { }
| Report Duplicate | Flag | PURGE
Cisco Systems Software Engineer / Developer - 0of 0 votes
AnswersWhat is address alignment?
struct xx { char a; int b; }; printf("%d", sizeof(struct xx));
what would be output of this printf statement? and what would it be if it is union?
- bobbysanders007 in United States| Report Duplicate | Flag | PURGE
Cisco Systems Software Engineer / Developer Knowledge Based - 0of 0 votes
AnswersConsider you have a grid of size m x n. There are stones placed randomly in some of the squares of this grid. Design a way to find out minimum rectangular area which covers all the stones in this grid.
- bobbysanders007 in United States| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Algorithm - 0of 0 votes
AnswersA) Write a function that takes input as integer and converts it into a linked list where each node represents a digit of the input integer.
- bobbysanders007 in United States
e.g. i/p : 123
expected result: [1] => [2] => [3] => [null]
(catch: don't forget to consider case of negatives like -433 etc.)
B) Write a function that takes input as two linked lists shown as above (which are basically integers represented in linked list format) and calculate sum.| Report Duplicate | Flag | PURGE
Microsoft Software Engineer in Test Algorithm - 0of 0 votes
AnswersConsider any social networking website like facebook etc.
Design an algorithm / function that calculates minimum degree of connection between given two users. Assume that you are have already written function that returns a list of friends of given user :getFriends(username/id)
[EDIT]
- bobbysanders007 in United States
Sorry guys for the wrong choice of words and caused confusion. It is "minimum degree of separation" and not connection.
(I still think there isn't much different but quite sure it has already confused so many people...anyways... :) )
follow this link for explanation : http://en.wikipedia.org/wiki/Six_degrees_of_separation| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm - 0of 0 votes
AnswersDesign a class for maze.
- bobbysanders007 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Application / UI Design - 0of 0 votes
AnswersYou have yesterday's and today's log files that contains ids of users who logged in on amazon's website (there could be million entries). Design and implement way to find out user ids who logged in on both days.
- bobbysanders007 in United States| Report Duplicate | Flag | PURGE
Amazon Software Engineer / Developer Algorithm Data Structures