## Applications Developer Interview Questions

- 0of 0 votes
Difference in memory allocation for struct & class and class & object.

- 3of 3 votes
Print a character 1000 times without using loop and recursion.

- 0of 0 votes
You have eight balls all of the same size. 6 of them weigh the same, and two of them weighs slightly more. How can you find the balls that is heavier by using a balance and do this in minimum number of steps?

- 0of 0 votes
normal bubble sort require 100sec to sort 10000 entries.what will be the input size if it will solve in 50sec.

- 0of 0 votes
Manage n queues in a given memory.

Support below operations on queues.

//initialize n queues in memory m of size s

//queues will be identified with numbers from 0 to n-1

void initialize(void* m,int s,int n);

//enqueue object o into queue identified by q

//as long as there is free memory this should be successful

void enqueue(int q,Object o);

//dequeue an object from queue identified by q

Object dequeue(int q);

Give the best solution such that there will be minimum relocation of queues

- 0of 0 votes
Design a system for the customer to review a product. It should be able to incorporate web-services. Describe the entire flow from the client to the database.

- 0of 0 votes
Convert binary search tree to doubly linked list

- 0of 0 votes
Given list of words in the order as in the dictionary, find the order of the alphabets.

Suppose you are given words in the same order as in the dictionary like a, ant, ball, cat, do, dog, fog, frock etc.

From these words you know that there are alphabets a, n, t, b, l, c, d, o, g, f, r, k.

You don't know the order of these alphabets before hand.

You will have to find the order of these alphabets based on the order of the given words.

From a and ant you cannot make out anything.

From ant and ball you can make out that a comes before b in the order.

From ball and cat you can make out that b comes before c in the order.

From cat and do you can make out that c comes before d in the order.

From do and dog you cannot make out anything.

From dog and fog you can make out that d comes before f in the order.

From fog and frock you can make out that o comes before r in the order.

From these clues you should make out the order of the alphabets.

Not necessarily you will be given all the dictionary words, but the words which are sufficient enough to make out the order of the alphabets.

You can always say you cannot make out the order if the words given are not sufficient.

- 0of 0 votes
How to Achieve atomicity in Database given you are a database designer

- 0of 0 votes
There are 2 interfaces

Interface A

-> max()

Interface B

-> max()

Note:

max() have everything same signature are same in all respect

There is a class C which implements A and B

then what happens

> Compile time error

> Runtime

>No error it works fine

- 0of 0 votes
Remove all two zeros in the given string.

Example: a3409jd00dk000d

Output: a3409jddk000d

Note: If there are less/more than two zeros consecutive, it should not be replaced.

- 0of 0 votes
Find sub-array in an array of integers whose sum is maximum, integers can be negative, zero or positive.

- 0of 0 votes
Print the JSON text in an indented format.

Example: {A:"B",C:{D:"E",F:{G:"H",I:"J"}}}

Output as below

{

A:"B"

C:

{

D:"E"

F:

{

G:"H"

I:"J"

}

}

}

- 0of 0 votes
Find a raised to the power b, where both a and b are integers

- 0of 0 votes
Multiply two large integers represented in char array.

- 0of 0 votes
Find level wise linked lists in a BST.

Example: 1 has children 2 and 3

2 has children 4 and 5

3 has children 6 and 7

6 has children 8 and 9

then the algorithm should give the below

result[0] = 1

result[1] = 2->3

result[2] = 4 -> 5 -> 6 -> 7

result[3] = 8->9

- 0of 0 votes
Find common ancestor of two nodes which has least value.

- 0of 0 votes
There are n nodes with a value in each node.

Communication between two nodes can happen any time to pass the node value from one to the other, every communication takes 1 second.

Whenever communication happens from node a to node b, node b's value can be changed based on node a's value.

One node cannot participate in communication to two other nodes at any point of time.

At any point of time each node can hold only one value.

We need to end up with "sum of the values in all the nodes" as the value in all the nodes, how much time is required?

- 0of 0 votes
Check if circular open and close braces in a string are matching, braces can be nested.

- 0of 0 votes
Reverse double linked list

- 0of 0 votes
Merge two sorted arrays

- 0of 0 votes
how do you create a duplicate of a DoublyLinkedList in which the .next is okay but .prev can point to any node in the link list

- 2of 2 votes
You have one table with a single column having three values a,b and c.

Current snapshot of the table is

Table :- tblTest

Values :-

tblColumn

a

a

a

b

b

b

b

c

c

We need and output in SQL Server in the format:-

Acount BCount CCount

3 4 2

Do not use temporarytable/variables/multiple queries in a single query.

Values are restricted to be a, b and c only but the count may vary and output will change accordingly.

- 0of 0 votes
Given a dictionary of words, two APIs

Is_word(string)

Is_prefix(string)

And a NxN matrix with each postion consisting of a character. If from any position (i,j) you can move

in any of the four directions, find out the all the valid words that can be formed in the matrix.

(looping is not allowed, i.e. for forming a word position if you start from (i,j) and move to (i-1,j) then

from this position you cannot go back to (i,j))

- 0of 0 votes
Given a newspaper and a set of ‘l’ words, give an efficient

algorithm to find the ‘l’ words in the newspaper.

- 0of 0 votes
Q1) Given that there are n players and each one of them has played exactly one game with every

other player. Also given is an API that tells whether player ‘a’ won or lost to player ‘b’, where ‘a’ and

‘b’ could be any of the players. Arrange the n players in a length n array such that player at position

‘i’ has won from player at ‘i+1’ and lost to player at ‘i-1’

Interested in linear time solution

PS: Its not a sorting problem. Please notice that problem is not asking for ranking in decreasing order..

- 0of 0 votes
By using core dump file, how do you traverse a linked list.

i.e you got a core dump file while printing the linked list with head pointer. suppose at node number 40000,

each node has an unique identification number(lets say id starts with 1 to 100000, i.e 1 lac nodes are there in the list), I want to see the node content with identification number 122.

You have only coredump file and sorce code file with you. You are working with core dump file now.

- 0of 0 votes
Major difference between Forward and sendRedirect apart from browser calls sendRedirect and container process forward request?

- 0of 0 votes
What is volatile variable?

- 0of 0 votes
What is the difference when ArrayList is synchronized and used with respect to vector is there any difference?

Focus point is both will be in synchronized state whats happens internally.