Software Interview Questions | Glassdoor.co.in

Find jobs for Software

Software Interview Questions

62,568

Software interview questions shared by candidates

Top Interview Questions

Sort: RelevancePopular Date

Puzzle: How do you weight an elephant without using a weigh machine?

37 Answers

Use a pool -> calculate the volume of water of the pool and the water level, put the elephant in the pool, take note of the level after the elephant after it is in the pool. By Archimedes principle, the volume of water dislocated is the same as the weight. So the weight of the elephant is the same as the difference in water volume.

Not quite. The volume of the water is not the same as the weight of the elephant. You'd have to estimate the density of an elephant and multiply that by the volume of the water to get the mass, then multiply that by the acceleration due to gravity in water system (SI, English Customary, etc.) you're using. Luckily, mammals are mostly water (humans are around 70% water on average), so about 2/3 of the weight of the elephant would be equivalent to the weight of the water displaced. So you would have to estimate how dense the rest of the elephant is (since it'd be minerals and such, I'd say it's more dense than water) and follow the steps described above.

Apply a known force to the elephant and measure the acceleration. Use physics to deduce the mass.

Given a string "aaabbbcc", compress it, = "a3b3c2" . Given that output string's length is always smaller than input string, you have do it inplace. No extra space

28 Answers

Given a number find it is one less than the power of two.

15 Answers

Assume a matrix of integers they are sorted in boh row and column vice .. how do u find a given number from the matrix in a optimal way?

10 Answers

Why do you want to join Wipro ? and please don't give me crap answers !

12 Answers

Come out with an algorithm for getting the column number provided the column name in a excel sheet and vice versa. Excel has a naming convention of A,B..Z,AA,AB,AC..ZZ,AAA... This had to be converted to the column numbers. A will be 1 and AA will 27.. Also the algorithm to find the name provided column number.

13 Answers

Given an array of numbers, nums, return an array of numbers products, where products[i] is the product of all nums[j], j != i. Input : [1, 2, 3, 4, 5] Output: [(2*3*4*5), (1*3*4*5), (1*2*4*5), (1*2*3*5), (1*2*3*4)] = [120, 60, 40, 30, 24] You must do this in O(N) without using division.

13 Answers

How many rotations does earth make on its axis while going around the sun for one year.

10 Answers

out of 25 horses select the fastest three in minimum number of races where in each race there would be exactly five horses.

10 Answers

Can't disclose the exact question because of NDA, but here's some food for thought: 3 can be written as 1+1+1, 1+2, 2+1 4 can be written as 1+1+1+1, 1+1+2, 2+2, 1+2+1, 2+1+1, 3+1, 1+3 Given an integer, how many possible expressions exist? (1+2 and 2+1 are different)

8 Answers
110 of 62,568 Interview Questions