## Developer Program Engineer Interview Questions

- 0of 0 votes
High coverage can always be achieved by writing a unit test for every method.

True

False

- 0of 0 votes
For a given array size is know but elements using index is not accessible. 2 given functions are below:

1. getIndexOfNthLargest(int n) // returns the index of nth largest number. Like for n=1 the index of largest element will be returned, for n=2 the index of 2nd largest number will be returned.

2. reverseArray(int i) // reverse the elements of the array from index 0 to i

How to sort the array in place?

- 0of 0 votes
If there are two threads in your app - T1 and T2. T2 has high priority. However, for some reason the priority decreases automatically. What could be the reason? How will you debug it? How will you fix it so that pririty stays the same, no matter what.

- 0of 0 votes
Given an array { -2 3 5 0 -3 7 -1}. Sort the array in such a way that array should contain -ve numbers first and then zero and then all +ve numbers. (Note: order of +ve number and order of -ve numbers should be same after sorting). For ex: the o/p of above array is {-2 -3 -1 0 3 5 7}

- 0of 2 votes
Given 3 sorted arrays. Find(x,y,z), (where x is from 1st array, y is from 2nd array, and z is from 3rd array), such that Max(x,y,z) - Min(x,y,z) is minimum.

- 0of 0 votes
If we have given a data type, how can we find the precision value for this........need just an algo....

- 0of 0 votes
Write an algorithm that takes a file containing a sequence of lines representing all the folders in a mailbox where each line is of the form Id,ParentId,Name and produces a sorted hierarchy of folders with children indented from their parents and each line containing DisplayName:Id. For example if the input is:

4,17,Scott

1,0,Spock

17,0,McCoy

9,17,Kirk

Then the output should be:

McCoy:17

Kirk:9

Scott:4

Spock:1

- -1of 1 vote
what is diffarence between semop and semctl?

we can change the semaphores using both apis?what is the diffarence?

- 0of 0 votes
double factorial of a number N

example: N!!

- -1of 1 vote
1)find first N factorial primes (not prime factorials)

- -1of 1 vote
write efficient program to find the sum of x^y + y^ and x^y - y^x and x^y/y^x and x^y*y^x

- 0of 0 votes
Given an array A of size 26*26. Determine whether each row and column of the array consists of set {a,b,c,d,.....z} where each element occurs exactly once

- 0of 0 votes
The shortest code by character count that takes a single input integer N (N >= 3) and returns an array of indices that when iterated would traverse an NxN matrix according to the JPEG "zigzag" scan pattern.

For Ex`1 2 3 (Input) 3 --> 4 5 6 --> 7 8 9 Output--> 1 2 4 7 5 3 6 8 9 1 2 3 4 (Input) 4 --> 5 6 7 8 9 10 11 12 13 14 15 16 output 1 2 5 9 6 3 4 7 10 13 14 11 8 12 15 16`

- 0of 0 votes
how many times the base class are called in the following code.

`class Base { } class D1:public Base { } class D2:virtual public Base { } class DD: public D1, public D2 { } int main() { DD cObj; }`

- -2of 2 votes
For Winshuttle Written Test Search on YouTube:

Winshuttle Placement Paper

- 0of 0 votes
how to sort 100 numbers given using memory size sufficient for 20 elements only(like array of size 20)

- 0of 0 votes
how to convert an english sentence into our native language sentence(given an dictionary of english-native language)..what data structures will be used for implementing dictionary and how to convert using it??

- 0of 0 votes
You are blindfolded and 20 coins are placed on the table in front of you. Out of them 10 coins have heads facing up and other tails. You are allowed to flip and move the coins. You should divide those coins into two sets such that one set contains 10 heads and other tails. You are allowed to only move or flip the coins

- 0of 0 votes
How to count the number of ones in the a number's representation. If the number is too large and how would you speeden up using parallel processing or any other technique?

- 0of 0 votes
Remove whitespace characters in a string, in place and with out shifting

- 0of 0 votes
That you are given 4 identical tablets. Of which 2 are for cold and 2 for headache. 100mg each. All the tablets look the same. You have a patient and you have to provide him with the medicine. You must give him one tablet for cold and one for headache. But you do not know which one is for cold and which one for the headache. So how will you give it to him. If he has more than 100mg of a specific medicine he'll die.

- 0of 0 votes
There are two very large arrays. Write a program to take their union in a Java Set in a time efficient way.

- 0of 0 votes
Given any five random points on a integer grid, prove that the mid-point of at least one pair lies on the grid.

- 0of 0 votes
You are given a graph-tree kind of Data structure such that it has no cylces( can also think of it as a n-ary tree). It is a undirected graph. You have to find out the node which, if taken as root, would result in making height of every node as min.( Or you can say it will be balanced)

- 0of 0 votes
You are blindfolded and placed in front a table with two jars. One jar has 50 red balls and other has 50 blue balls. What should be your strategy so that you pick up the red ball with more than 50% probability.

- 0of 0 votes
When singleton wont work as singleton??

- 0of 0 votes
What is a weakHashMap??weak References??

xplain with example

- 0of 0 votes
What is a Executer in threads??

- 0of 0 votes
There is an interesting game named one person game. It is played via a m*n grids. There is an non-negative integer in each grid. At first your score is 0. You cannot enter a grid with integer 0. You can start and end the game at any grid you want (of course the number in the grid cannot be 0). At each step you can go up, down,left and right to the adjacent grid. The score you can get at last is the sum of the grids on your path. But you can enter each grid at most once.

The aim of the game is to get your score as high as possible.

Input:

The first line of input is an integer T the number of test cases. The first line of each test case is a single line containing 2 integers m and n which is the number of rows and columns of the grids. Each of next the m lines contains n space-separated integers D indicating the number in the correspoding grid

Output:

For each test case output an integer in a single line which is maximum score you can get at last.

Constraints:

T is less than 7.

D is less than 60001.

m and n are less than 8.

Sample Input:

4

1 1

5911

1 2

10832 0

1 1

0

4 1

0

8955

0

11493

Sample Output:

5911

10832

0

11493

- -2of 2 votes
c