Software Interview Questions

551,194 software interview questions shared by candidates

Brain teaser: two person have two pizza for food, but only one of them is holding the knife. One cut per pizza. Each has only one chance to have the priority to choose one slice of a pizza. It means a process of cutting, choosing, cutting choose. How many of the pizza can the one with knife get maximum?
avatar

Software Engineer

Interviewed at Bloomberg

4
Sep 8, 2010

Brain teaser: two person have two pizza for food, but only one of them is holding the knife. One cut per pizza. Each has only one chance to have the priority to choose one slice of a pizza. It means a process of cutting, choosing, cutting choose. How many of the pizza can the one with knife get maximum?

Flatten a 2D linkedList . A node contains 3 parameters namely, data , pointer to left, pointer to down . The aim of the function is to flatten the linkedlist. Ex: 1-->2-->4 | V 3 Answer is 1-->2-->3-->4 Ex: 1 --> 2--> 3--> 4 | 5-->6-->7 | | 8 9 Answer is 1-->2->5 -> 8 -> 6->9 ->7-> 3-> 4 He asked me to make the same linkedlist flatten not to create a new LinkedList or print the elements
avatar

Software Engineer

Interviewed at Bloomberg

4
Mar 6, 2015

Flatten a 2D linkedList . A node contains 3 parameters namely, data , pointer to left, pointer to down . The aim of the function is to flatten the linkedlist. Ex: 1-->2-->4 | V 3 Answer is 1-->2-->3-->4 Ex: 1 --> 2--> 3--> 4 | 5-->6-->7 | | 8 9 Answer is 1-->2->5 -> 8 -> 6->9 ->7-> 3-> 4 He asked me to make the same linkedlist flatten not to create a new LinkedList or print the elements

You are given a predefined function which generates random number from 1 to 5. You need to use this function and create another function which will generate random number from 1 to 7. Now most important thing is to remember that new random function should be even (i.e. the number generated should be unpredictable, and evenly spaced out).
avatar

Software Engineer II

Interviewed at eBay

4
Mar 28, 2011

You are given a predefined function which generates random number from 1 to 5. You need to use this function and create another function which will generate random number from 1 to 7. Now most important thing is to remember that new random function should be even (i.e. the number generated should be unpredictable, and evenly spaced out).

Viewing 3041 - 3050 interview questions

Glassdoor has 551,194 interview questions and reports from Software interviews. Prepare for your interview. Get hired. Love your job.