Amazon Interview Question for Software Engineer / Developers






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

Table
NODE_ID Adjacent_Node_ID

This will be enough to represent a graph.

- Anonymous February 03, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Point table
Point pair table indicates the edge in the graph

- anonymous November 14, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Can you be more specific on that? Did you mean:

TABLE points;

ID=1, X=1, Y=2
ID=2, X=3, Y=2

TABLE pairs;

ID=1, POINT1=1, POINT2=2

Is this the best thing to do?

- Anonymous April 15, 2009 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

One point pair table and include each edge only once.

- Anonymous November 16, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Am new to DB. Can anybody explain it more elaborately.

- knap November 17, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

hey i could not find anything like point table as standard is it your abbreviation for any use of any data structure or any standard

- harsh November 18, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Some sort of an adjacency list where node is the key which contains a multivalued attribute column neighbour.

- XYZ December 04, 2008 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

take table as a matrix and use matrix representation of graph. suppose that a,b,c,d are node in a graph than use column name in a table as a,b,c and d. and put single row in this table corresponding to node.

- Abhishek June 12, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

take table as a matrix and use matrix representation of graph. suppose that a,b,c,d are node in a graph than use column name in a table as a,b,c and d. and put single row in this table corresponding to node.

- Abhishek June 12, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

http://bytes.com/topic/sql-server/answers/854993-speed-q-storing-large-graphs-db-inserting-several-million-rows-research-proj

- algooz June 26, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Storage Engine - MEMORY.

- Anonymous July 14, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Store Nodes in an Array

For each node, Store Its adjacencey list in a LInked List!

- Sathish November 22, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Store Nodes in an Array

For each node, Store Its adjacencey list in a LInked List!

- Sathish November 22, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Use Clustered Index method

create table having <vertex,adj.pairs> as each vertex might point to more than one vertex there is a possibility of vertex getting repeated.
So Clustered Indexing works well

- Praneeth.N June 29, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

For a directed graph
Vertex(ID,X,Y)
Primary Key:ID

VertexNeighbour(ID,NeighbourVertextID,EdgeVal)
Primary Key: [ID,NeighbourVertextID]
NeighbourVertextID reference ID

- Anonymous July 17, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

For a directed graph
Vertex(ID,X,Y)
Primary Key:ID

VertexNeighbour(ID,NeighbourVertextID,EdgeVal)
Primary Key: [ID,NeighbourVertextID]
NeighbourVertextID reference ID

- pk July 17, 2010 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Table Graph
( point,
x_axis,
y_axis )

data looks like

1,2,3
2,3,4
....
....

- AG September 15, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

vertex(point_id, point_value) ;
edge(point_id_parent, point_id_child, edge_value);

- aileen April 21, 2013 | 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