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))
Software Interview Questions
748,264 software interview questions shared by candidates
Write running code to print out the level order traversal of a binary tree
Simple regex matching.
Phone interview questions: Given an array of numbers (1,2,3,8,0,2,2,0,10), move all 0s to the right end and all other numbers to the left while keeping relative order of non-zero numbers. Has to be linear in time and in-place.
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.
Viewing 1461 - 1470 interview questions