Applications Developer Interview Questions
- 0of 0 votes
AnswersManage n queues in a given memory.
- Naveen Reddy Mandadi August 31, 2012 in India
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| Report Duplicate | Flag | PURGE
Microsoft Applications Developer Algorithm - 0of 0 votes
AnswerDesign 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.
- Naveen Reddy Mandadi August 30, 2012 in India| Report Duplicate | Flag | PURGE
Amazon Applications Developer Computer Architecture & Low Level Data Structures Application / UI Design - 0of 0 votes
AnswersConvert binary search tree to doubly linked list
- Naveen Reddy Mandadi August 30, 2012 in India| Report Duplicate | Flag | PURGE
Amazon Applications Developer Algorithm - 0of 0 votes
AnswersGiven list of words in the order as in the dictionary, find the order of the alphabets.
- Naveen Reddy Mandadi August 30, 2012 in United States
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.| Report Duplicate | Flag | PURGE
Amazon Applications Developer Algorithm - 0of 0 votes
AnswersHow to Achieve atomicity in Database given you are a database designer
- Moiz Arsiwala August 29, 2012 in India| Report Duplicate | Flag | PURGE
MAQ Applications Developer Database - 0of 0 votes
AnswersThere are 2 interfaces
- Moiz Arsiwala August 29, 2012 in India
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| Report Duplicate | Flag | PURGE
MAQ Applications Developer Object Oriented Design - 0of 0 votes
AnswersRemove all two zeros in the given string.
- Naveen Reddy Mandadi August 25, 2012 in India
Example: a3409jd00dk000d
Output: a3409jddk000d
Note: If there are less/more than two zeros consecutive, it should not be replaced.| Report Duplicate | Flag | PURGE
Microsoft Applications Developer Algorithm - 0of 0 votes
AnswersFind sub-array in an array of integers whose sum is maximum, integers can be negative, zero or positive.
- Naveen Reddy Mandadi August 25, 2012 in United States| Report Duplicate | Flag | PURGE
Microsoft Applications Developer Algorithm - 0of 0 votes
AnswersFind a raised to the power b, where both a and b are integers
- Naveen Reddy Mandadi August 25, 2012 in India| Report Duplicate | Flag | PURGE
Microsoft Applications Developer Algorithm - 0of 0 votes
AnswersMultiply two large integers represented in char array.
- Naveen Reddy Mandadi August 25, 2012 in India| Report Duplicate | Flag | PURGE
Microsoft Applications Developer Algorithm - 0of 0 votes
AnswersFind level wise linked lists in a BST.
- Naveen Reddy Mandadi August 25, 2012 in United States
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| Report Duplicate | Flag | PURGE
Amazon Applications Developer Algorithm - 0of 0 votes
AnswersFind common ancestor of two nodes which has least value.
- Naveen Reddy Mandadi August 25, 2012 in India| Report Duplicate | Flag | PURGE
Amazon Applications Developer Algorithm - 0of 0 votes
AnswersThere are n nodes with a value in each node.
- Naveen Reddy Mandadi August 25, 2012 in United States
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?| Report Duplicate | Flag | PURGE
Amazon Applications Developer Algorithm - 0of 0 votes
AnswersCheck if circular open and close braces in a string are matching, braces can be nested.
- Naveen Reddy Mandadi August 25, 2012 in India| Report Duplicate | Flag | PURGE
Amazon Applications Developer Algorithm - 0of 0 votes
AnswersReverse double linked list
- Naveen Reddy Mandadi August 25, 2012 in India| Report Duplicate | Flag | PURGE
Amazon Applications Developer Algorithm - 0of 0 votes
AnswersMerge two sorted arrays
- Naveen Reddy Mandadi August 25, 2012 in India| Report Duplicate | Flag | PURGE
Amazon Applications Developer Algorithm - 0of 0 votes
Answershow 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
- jeetu.mfp August 23, 2012 in India| Report Duplicate | Flag | PURGE
Akamai Applications Developer Data Structures - 2of 2 votes
AnswersYou have one table with a single column having three values a,b and c.
- Black Stallion July 26, 2012 in India
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.| Report Duplicate | Flag | PURGE
Oracle Applications Developer Database - 0of 0 votes
AnswersGiven a dictionary of words, two APIs
- words&lyrics July 12, 2012 in India
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))| Report Duplicate | Flag | PURGE
Amazon Applications Developer - 0of 0 votes
AnswersGiven a newspaper and a set of ‘l’ words, give an efficient
- words&lyrics July 12, 2012 in India
algorithm to find the ‘l’ words in the newspaper.| Report Duplicate | Flag | PURGE
Amazon Applications Developer - 0of 0 votes
AnswersQ1) Given that there are n players and each one of them has played exactly one game with every
- words&lyrics July 12, 2012 in India
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..| Report Duplicate | Flag | PURGE
Amazon Applications Developer Algorithm - 0of 0 votes
AnswerBy using core dump file, how do you traverse a linked list.
- sse July 05, 2012 in United States
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.| Report Duplicate | Flag | PURGE
Adobe Applications Developer Algorithm - 0of 0 votes
AnswersWhat is volatile variable?
- for.forums.java June 20, 2012 in India| Report Duplicate | Flag | PURGE
Pega Applications Developer - 0of 0 votes
AnswersWhat is the difference when ArrayList is synchronized and used with respect to vector is there any difference?
- for.forums.java June 20, 2012 in India
Focus point is both will be in synchronized state whats happens internally.| Report Duplicate | Flag | PURGE
Pega Applications Developer Java - 0of 0 votes
Answerswhat is the o/p of following along with justifying logic ?
- jainabhishek.inc June 13, 2012 in United States#include<stdio.h> main() { int i=0; prrintf("%%%%"); }
| Report Duplicate | Flag | PURGE
Accenture Applications Developer C - 0of 0 votes
AnswersGiven random integers in N number of files , with each file having set of integers (count different in each set). To find if the sum of all these integers divisible by 8 or not ? Optimize your solution.
- nehadhardce May 29, 2012 in India| Report Duplicate | Flag | PURGE
Adobe Applications Developer Algorithm - 0of 0 votes
AnswersWhat is the next number in the series
- DashDash May 12, 2012 in India
2,4,8,16,24...| Report Duplicate | Flag | PURGE
Goldman Sachs Applications Developer Brain Teasers