## Applications Developer Interview Questions

- 0of 0 votes
Find the number of ways you can have breakfast in 'n' days, given Bread-butter can be eaten every day, Pizza can be eaten every alternate day and Burger can be eaten every two days.

- 0of 0 votes
/* The objective of this exercise is to build a road network connecting every pair of cities.

Each city should be connected to each other city once.

*/

public class Program

{

/* Your function RoadBuilder should return a list of new roads required to be built,

if the existing roads are given by builtRoads and the total number of

cities is nCities. Roads should not connect cities to themselves.

*/

public static int[][] RoadBuilder(int nCities, int[, ] builtRoads)

{

//implement the function here

return new int[0][];

}

public static void Main()

{

int[, ] test1 = new int[3, 2]{{0, 1}, {1, 2}, {3, 2}};

Console.WriteLine(RoadBuilder(4, test1)); // expected result should be {{0,2}, {0, 3}, {1, 3}}

}

}

- -2of 2 votes
Yahoo mail not receiving emails

If you facing issues related with your email, it may be that there would be some severe issues with your Yahoo account. So, here you need have the proper diagnosis of your Yahoo account so that you could know about the actual issue that is running with your Yahoo account. Here, without thinking anything you should dial a Yahoo technical support number. With Yahoo technical support number you can easily find solution of your choice. So, just dial a Yahoo technical support number and find the solution at the very fast and reasonable rate.

http://www.email-support-desk.com/yahoo-customer-care.html

- 0of 0 votes
A list of students and their marks in three subjects are given in the respective order.

Student1 20 40 65

Student2 35 40 50

Student3 10 55 65

Given n = 2.

Find the name of the students who has got top marks in atleast n subjects.

Output for the above example

student1

student3

since they got top marks in atleast 2 subjects

- 0of 0 votes
Write a Java program to get the count of ipv6 address present in the provided address range.

Ex: if we provide ipv6 address range 2001:db8::/124 then the program should display the range contains 16 IP's.Starting from 2001:db8:: to 2001:db8:0000:0000:0000:0000:0000:000f.

- 0of 0 votes

- -2of 2 votes
Program to increment the vavue of array element by 1 and cost require to each increment value us 1 print cost

- 1of 1 vote
There is a 2D grid and there are two players P1 and P2. Their x,y positions are given. Then there are N gems on the grid and their positions are also given. The two players together are supposed to collect the gems in the given sequence making minimum moves (movement in all 8 directions is considered as 1 move). Note: the gems should be collected in the given order by either one of the players and then their position then becomes the position of the gem.

- 0of 0 votes
Jacob and Peter have their favorite number X and Y. We have given an array with positive interger number and we need to find the longest prefix index which contain equal number of X and Y. return -1 if there is no prefix with equal number of X and Y.

Suppose we have an array A = [7,42,5,6,42,8,7,5,3,6,7]

X = 7

Y =42

Output should be 9 as prefix will be index from 0 to 9 with equal number of X and Y.

I wrote below code but this has some bug which I could not find.`public int findIndex(int A[],int N,int X,int Y) { int nx =0; int ny=0; int result = -1; for( int i=0;i<N;i++) { if(A[i] == X) nx+=1; else if(A[i] == Y) ny+=1; if(nx== ny&& nx!=0&&ny!=0) result = i; } return result; }`

- 0of 0 votes
2. You have logfile for one process, that logfile is updating with heavy logs like never before. What will be cause for logfile to be updating with heavy logs.

- 0of 0 votes
1. If server is slow then tell me what are all the possible ways to trouble shoot to find why the server is slow.

- -3of 3 votes
Write program that takes integer, deletes one of two consecutive digits and return greatest of all results.

- -1of 1 vote
OO design for implementing table tennis game between two players? I just want the class diagram not the whole implementation. Only the class/interfaces names will help.

- 0of 0 votes
Please post me full explanation(not only answer)

I want to know how it works.`#include<stdio.h> void main() { int x=1, y=8, z; z= ++y + ++x + ++x; printf("z=%d", z); }`

- 1of 1 vote
Need Java Program :

A rectangular plot comprising n*m block ( cement block in shape of a cube) were kept, one block per each cell. the base of

each block covers one cell completely and its surface is equals to one square meter. cube on adjacent cell are so close

that there are no gaps between them.due to a heavy rain on the constuction, water is accumulated in the gaps created

between a group of blocks due to the difference in their heights.

write a program to calculate the volume of water accumulated between the blocks on the constrution.

Input Specifications:

your function must read three arguments i.e plot_length,plot_breadth and block_height

where

- Plot_length (r) : provides the length of each rectangular plot in metres.

- Plot_breadth (c) : provides the breadth of each rectangular plot in metres.

- Block_height(int array) : provides the height of r*c blocks row-wise.

Constraints

1<=plot_length,plot_breadth,block_height<=10

Output Specifications:

output will be an integer that will depict the volume of water (in cubic metres) accumulated in the puddles due to the

difference in heights of block.

Examples:

Example 1:

input1 =3

input2=6

input3={3,3,4,4,4,2,3,1,3,2,1,4,7,3,1,6,4,1}

output: 5

Example 2:

input1 =6

input2=3

input3={3,3,7,3,1,3,4,3,1,4,2,6,4,1,4,2,4,1}

output: 5

- 0of 0 votes
Need Java code:

In a Multinational company employees are ordered to seat according to their height in a line. they always choose their

positions randomly to displeasure their manager. one evening, the employee learn that their strict manager has secretly

recorded their seating positions from that morning, and that he will be checking their positions in the next moning to

make sure they are exactly the same.

Each employee only remember one thing from that morning: the number of people to his left that were teller then him.

there are N employees, each with a different height between 1 to n. using this information you must reconstruct the

seating arrangement from that morning.

you are given a int[], the ith element of which represents the number of taller employees to the left of the employee with

height i (where i is a 1-based index). Return a int[] containing the heights of the employees from left to right in the line.

Note: The input is guaranteed to produce a valid and unique output.

Inputs Specifications:

your function should accept the fallowing inputs:

Input 1: N

Input 2: An array(left[]) of n integers

Output Specifications:

you need to return the int [] containing the heights of the employees from left to right in the line.

Example :

Input:

input 1: 4

input 2: {2,1,1,0}

Output: {4,2,1,3}

Explanation:

Employee of height 1 remembered there were 2 employees taller than him to his left.

Employee of height 2 remembered there were 1 employees taller than him to his left.

Employee of height 3 remembered there were 1 employees taller than him to his left.

Employee of height 4 remembered there were no employees taller than him to his left.

the orginal order from left to right must have been 4,2,13.

this ordering satisfies all four conditions.

For example, there are exactly two employees to the left of the employees with height 1 that are taller then him(heights 4

and 2). A different ordering,like 4,3,1,2, satisfies some, but not all of the four conditions. in this incorrect ordering, there

are two employees to the left of employee with height 2 that are taller then him(height 4 and 3), but input states that

there was only one.

- 0of 0 votes
Can you please tell me the implementation of full adder ?

- 0of 0 votes
Given the X Y coordinates, width and length of 2 rectangles. Implement a function which returns "True" if the 2 rectangles intersect otherwise returns "False". The first 2 values represent the X Y coordinates, the following 2 represent the width and length.The last 4 values represent the second rectangle. The "8" values should be read from console and the result should be printed to console. Test input "1 1 1 1 -1 -1 3 3"

- 0of 0 votes
Define and implement a function that takes two binary numbers represented as strings and returns their sum as another binary number which is again represented as a string. The result should not have any leading zeroes. In case the result is zero, it should be the string "0". Test input "111 1"

- 0of 0 votes
How to find primes using SQL?

This is the SQL I came up to , but it looks like it'll only get numbers more than the square root

SELECT m1

FROM

(SELECT rownum m1 FROM dual d CONNECT BY LEVEL <1000

)

WHERE NOT EXISTS

(

SELECT x

FROM

(SELECT ROWNUM x FROM DUAL CONNECT BY LEVEL <= (sqrt(1000)))

WHERE x > 1

AND mod(m1,x) = 0

)

- 1of 1 vote
there is a file and 5 processes

how can you grant access so that

only 2 process can write to file and 1 can read file at a time

in linux

- 2of 2 votes
Given an array arr[] of size n. Three elements arr[i], arr[j] and arr[k] form an inversion of size 3 if a[i] > a[j] >a[k] and i < j < k. Find total number of inversions of size 3

e.g.

Input: 23, 10, 24, 7, 12, 19

Ans: 23, 10, 7

- 0of 0 votes
MultiThreading: How to process trades paralelly, and if there are any trades that are modified need to process then in a sequential way.

For E.g. if there are 10 trades, of which some trades are like created and then immediately modified before being processed, then need to process the trades parallelly, and for those trades that are created and modifed, need to process them sequentially.

- 0of 2 votes
Given an array, find the first element that appears an even number of times.

- 1of 1 vote
Given a circular linked list. Find the longest sequence of numbers, where a sequence starts with any number, for example 3, and ends when you see that number again,another 3.

Imagine the circular linked list

3 8 9 7 2 1 3 4 6 [3] same as first element .i.e three.

The longest sequence would be 3 8 9 7 2 1 , the other candidate being 3 4 6

Finding for instance,starting at 8 and getting to the same 8 wouldn't count as a valid sequence.

- 1of 1 vote
Given a 8 by 8 matrix, find all possible paths , moving one cell downwards or on cell to the right,(one cell per movement ) from cell 0,0 , to cell 7,7

- 1of 1 vote
Find the first non-repeated element in an unsorted array.

- 0of 0 votes
Given a squared matrix, shift all elements 1 place to the right in circular fashion.

- 2of 2 votes
How to find middle element in a linked list without knowing the length of the linked list

- 0of 2 votes
You have 12 marbles. They all weigh the same, except one. You don't know if that one is heavier or lighter. You have a balance scale.What would be the minimum number of weighing required to find the odd one.