Flipkart Interview Question for Software Engineer / Developers






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

What is the expected output?

- Code Saviour April 19, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
1
of 1 vote

What is the input/output and the problem ?

- Anonymous April 20, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Bi-partite graph

- ? April 09, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

Cant we use two dimensional bit array?

- ashok.koyi September 17, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

// basically a node(Person) having his name and an array of pointers pointing to the Person object of other group if it has punched that guy. So basically a graph.

Person{
String Name;

Person punchedPerson[];


}

- anshulzunke September 23, 2011 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

The person nodes of 1 group could be arranged as an array or linked list. I personally would prefer as an array since the application might require accessing any person at a time.

- anshulzunke September 23, 2011 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

For in put we can use matrix and for the output it will be best if use graph.

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

1. Traverse the whole list once and find the number of participants, say n.
{A1,A2,A3,...An}
2. Create an array of n elements; initially all the values are 0. Each array element represents Ai.
3. For the first person, say A1. put Array[1] =1.
4. While any of the array element is 0, follow steps 5,6 and 7.
5. If 'Ai punches Aj' , and exactly one of(Array[i],Array[j]) is Not 0
then both are in different groups. So modify the array value accordingly.
like, A1 punches A4, and Array[1] is 1 and Array[4] is 0 then put -1 for Array[4].
6. Else if Ai value and Aj value are 0, continue.
7. if Ai and Aj are same (both 1 or both -1) then the INPUT IS WRONG. Return.
8. Print all A[i] which are 1, as First group. All a[i] which are -1 are second group.

- Arne March 28, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

stack

- pankaj kumar January 05, 2014 | 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