Amazon Interview Question for Dev Leads


Team: RMCC
Interview Type: In-Person




Comment hidden because of low score. Click to expand.
1
of 1 vote

can u elaborate your question. Do not understand the ask

- Anonymous December 05, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

can u elaborate your question. Do not understand the ask

- Anonymous December 05, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

how can i union two node in graph ?

- Kabha D December 30, 2015 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

how can i merge 2 nodes in a graph in 1 node , need to save the in and out edges and the nodes that was merged for contribution after that

for example a graph implementation in adj list:
1->3->4->6
2->3->4->6
5->4->6

and i want to merge the nodes 3 and 4 , then new nodes should be created 7 as :
1->7->6
2->7->6
5->7->6
7->6

the node 7 also will save [include 3,4 the merged nodes]
any one can help with that please

the implementation should be in c code.


typedef struct AdjListEntry {
int visited;
int index;
struct AdjListNode current; // node iniformation
struct AdjListEntry* next;
} AdjListEntry;

typedef struct AdjListNode {
int Uind;
char name[10];
char label[10];
adjOutEddgeLists *outEddges;
//adjInEddgeLists *inEddges;
} AdjListNode;

typedef struct adjOutEddgeLists{
AdjListNode *listNode;
adjOutEddgeLists *next;
}adjOutEddgeLists;

- KabhaD82 February 02, 2016 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

how can i merge 2 nodes in a graph in 1 node , need to save the in and out edges and the nodes that was merged for contribution after that

for example a graph implementation in adj list:
1->3->4->6
2->3->4->6
5->4->6

and i want to merge the nodes 3 and 4 , then new nodes should be created 7 as :
1->7->6
2->7->6
5->7->6
7->6

the node 7 also will save [include 3,4 the merged nodes]
any one can help with that please

the implementation should be in c code.


typedef struct AdjListEntry {
int visited;
int index;
struct AdjListNode current; // node iniformation
struct AdjListEntry* next;
} AdjListEntry;

typedef struct AdjListNode {
int Uind;
char name[10];
char label[10];
adjOutEddgeLists *outEddges;
//adjInEddgeLists *inEddges;
} AdjListNode;

typedef struct adjOutEddgeLists{
AdjListNode *listNode;
adjOutEddgeLists *next;
}adjOutEddgeLists;

- KabhaD82 February 02, 2016 | Flag
Comment hidden because of low score. Click to expand.
-1
of 1 vote

i need to write code to do partition on graph by union nodes and split vertexes
to 2 sub graphs

- Kabha December 30, 2015 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More