They asked me to do a recursive function of a powerset (Ex. powerset(a,b,c) = ((),(a),(b),(c),(a,b),(a,c),(b,c))
Developer Interview Questions
640,318 developer interview questions shared by candidates
Some questions on graph theory and then I was asked to write a function to check if a graph was bipartite.
How can one implement a queue with only a stack implementation?
Implement the functions for a stack and function getMinimum() all with O(1) complexity.
Problem Statement : 18 Ralway Stations from Tamil Nadu are given. A passenger need ticket. Upto the 5 stations journey, fare is 10 Rs. After the 5 stations, for every 5 stations, 5 Rs extra will be charged. For the full stretch journey i.e. From 1st to the last station, fare is 20 Rs. Input 1 : StationFrom - Guindy, StationTo - Kadambakkam Output 1 : Print ticket. i.e. StationFrom : Guindy, StationTo : Kadambakkam, Total Stops : 3, Total Fare : 10 Input 2 : StationFrom - Guindy , StationTo - Chennai Fort Output 2 : Print ticket. i.e. StationFrom : Guindy, StationTo : Chennai Fort, Total Stops : 8, Total Fare :15 Code should follow design principles, patterns. Test Driven Development would be preferable, not mandatory though.
Java question was around String pattern searching which you can do easily in around 20 minutes, if you can keep your mind calm where that clock is also ticking.
Print a binary search tree. Each level on a new line.
write a function which returns a fibonacci number for a given number n.
During the phone interview, the coding question was done on a google doc and asked: In Java, given a String of [a-z] characters, find and return the first character that appears only once. I implemented it using a counting array and in the end the manager asked if I could implement it in another way, which I mentioned I could do it using a HashMap.
Viewing 1181 - 1190 interview questions