# 7K

Application Developer interview questions shared by candidates

## Top Interview Questions

Sort: Relevance|Popular|Date
Applications Developer was asked...28 May 2015

### 10 people can share a bucket of coins equally. A monkey steals one coin. The no of coins are one less than equal share. one person after the other tries to take the coin but monkey kills them(killing spree?? :-)). each time a person dies the no of coins are always one short of equal share. what were the no of coins originally?.

I wont give the answer. Hint : know who divides you ;-)

I think 2520 is perfect

Answer is pretty simple: m%10=0 -----case 1 Lets assume n=m-1 Since the remainder is always same , when n is divider by any number from 10 to 1.. n%10 = n%9=.........=1 That means n+1 is completely divisible by all numbers from 10 to 1.. (Since it gives common remainder).. n + 1= Lcm of (1 to 10) = 2520 But we assumed n = m-1, so m -1+1 =m = 2520 Less

### 1. Take an integer input and output the number of 1's in it's binary representation. 2. Implement a mergesort. 3. Explain your level of understanding of data structures (trees, etc.) 4. What makes java different than other languages?

Hey, did you hear back from them about the final decision? Also, were u coding in Java or Python? If python, why did they ask you questions on java? Could u share those questions because I have been invited too Less

They ask you what language you feel most comfortable with and ask you questions based on that (I said Java). I haven't heard back but I have been contacted by another recruiter from their Manhattan office so maybe better luck on this second try. Good Luck! Less

Thanks man, best wishes to you too.. Nail it this time

### Tell me a palindrome date before 10-02-2001 (mm-dd-yyyy)

i got it to be in the 14 th century ...

Sorry it should be 08-31-1380

how can the month no. will be more than 12 i think the answer should be 29-11-1192 :) correct me if i am wrong..... Less

### Write a Java program to count the number of occurances of each number in a series of numbers.

import java.util.Scanner; public class Occurrence { public static void main(String[] args) { int n, count = 0, i = 0; Scanner s = new Scanner(System.in); System.out.print("Enter no. of elements you want in array:"); n = s.nextInt(); int a[] = new int[n]; int x[] = new int[n]; System.out.println("Enter all the elements:"); for(i = 0; i &lt; n; i++) { a[i] = s.nextInt(); } System.out.print("Enter the element of which you want to count number of occurrences:"); for(i = 0; i &lt; n; i++) { x[i] = a[i]; } for(i = 0; i &lt; n; i++){ count = 0; for(int j = 0; j &lt; n; j++) { if(a[j] == x[i]) { count++; } } System.out.println("Number of Occurrence of the Element:"+a[i]+"is"+count); } } } Less

import java.util.HashMap; import java.util.Map; import java.util.Scanner; public class Test { public static void main(String[] args){ Map map = new HashMap(); Scanner s1 = new Scanner(System.in); int a[] = new int[10]; System.out.println("Please enter the 10 numbers"); for(int i=0;i&lt;10;i++){ a[i]=s1.nextInt(); } for(int j=0;j&lt;10;j++){ int count = 1; for(int k=0;k&lt;10;k++){ if(j!=k){ if(a[j]==a[k]){ count++; } } } map.put(a[j],count); } for(Map.Entry m:map.entrySet()){ System.out.println("The value "+m.getKey()+" occurs "+m.getValue()+" times in the series which u have entered."); } } } Less

### We have a pond containing a single bacterium. The number of bacteria double every 5 minutes, and the pond is full of them in 24 hours. If we started with the same pond but two bacteria, how long will it take to fill the pond?

I struggled with this a bit and got close. I believe answer is: 23:55

The first pond started with 1 bacterium and doubled to 2 in five minutes. Therefore, the second pond will take 5 minutes less than the first to be full. ie: 23:55 Less

This is a clear case of Geometric progression. Find the nth term Tn1 = a*r^(n-1). where n = (24 * 60)/5,a = 1 and r=2. when the initial value (a) = 2, the values become n = ?, a = 2 and r = 2. Since Tn1 = Tn2, Equate the RHS of both the equation. Since the base are equal, equate the powers, doing so will give the n value. When n is convert into minutes one get 23 hrs 55 minutes. Less

When ever I get a work I never leave that work in between before completing it. This is one of my weakness. Less

i lose my temper quickly

go to their official sites..

### What data structure to use for Smartphone lock screen

A 3x3 2D array?, just store the sequence in which the blocks have to be selected

Graph data structure can be used, which consists of vertices, edges and x,y relation between vertices Less

graph (gesture) datastructure

### Given a list 1,0,3,5,0,0,34,5,0,36 push all the zeroes to the end. Develop an in-place algorithm

var MoveZerosToRight = function(arr) { let n = arr.length; let i = 0; for(let num of arr) { if(num !== 0){ arr[i] = num; i++; } } while(i &lt; n ) { arr[i] = 0; i++; } return arr; }; Less

Used 2 pointers one for zeroes and other for numbers, occasionally swapping to achieve what I want. Less

How will you be achieving the same order?

### There are 10 stacks of 10 coins each. 9 of the stacks contain coins that weigh 1g each. The other stack contains coins of 2g each. The coins look the same. We have a scale that we can get a measurement of grams from, not a balance. We can use the scale exactly once to weigh anything here from a single coin to all of them. How can we determine which stack is the 2g coins?

Weigh these together: 10 coins from stack 1, 9 from stack 2, etc ending with 1 from stack 10. The weight of these will tell you which stack has the 2g coins. Ex: if it's 1st stack: 65g, 2nd: 64g, 10th: 54g Less

A more eloquent answer would be: Weigh together 1 coin from stack 1, 2 coins from stack2, 3 coins from stack 3, etc. Subtract 55 from that total weight to get the number of the stack with the 2g coins. Less

Excellent question!