## Analyst Interview Questions

- 0of 0 votes
A List contains objects (a collection even). On iterator.next(), if a collection is encountered it should traverse it until it finds an object(not collection). Entering list.get(4) should give the object at 4th position

List contains - String, Double, List(Double, Person), List(Employee, Long). list.get(4) should return Employee

write a java function?

- 0of 0 votes
You have a guy who is walking on a street with "X" doors on one side

(say left side).From the third round, He has to walk "X" rounds to and

fro( from point A, starting point to B, ending point).

So he walks "X" times from A to B, and back "X" times.

First two rounds he just walks to and fro.

Every time he walks he closes the particular doors corresponding to

the number of the round of his walk, starting from the third round. So

at the third round, he closes the third door, sixth door, ninth door,

.... upto

"X", if "X" is a multiple of 3,

"X-1", if "X-1" is a multiple of 3

AND

"X-2", if "X-2" is a multiple of 3

Then he walks till the "X" door. This he does for every round, till

the "Xth" round.

So, if X is 300, he walks upto the 300th door, closes the 300th door

and returns.

If X is 400, he closes upto 399th door, goes till the 400th door and returns.

If X is 500, he closes upto 498th door, goes till the 500th door and returns.

While returning, he just does nothing. He just returns to where he

started i.e. POINT A.

Likewise for the fourth round, where he close doors that are multiples

of 4 i.e. 4, 8, 12, 16, etc till X (Similar calc as in the 3rd round,

except that we consider multiples of 4 here).

And so on till the "Xth" round.

I.E.

This continiues till "X" rounds. So, from 3 to X rounds. Note that we

have not included 1st and 2nd rounds.

Problem here is:

Write the code in any language of your choice to find:

What is the minimum number of the round where he would not have to close any door?

- 0of 0 votes
The cox email customer service phone number is where experts will assist the user in any difficulty faced.

Apart from this option to make a call to the experts, users can also select the option of live chat in which user can have a direct talk with the experts in order to get the assistance on different issues. Users can also find the solutions store where they can visit to get the assistance.

for more information visit our site:http://www.emailhelpgroup.com/cox-customer-service

- 0of 0 votes
Implement cache dictionary Code Assesment CustomCache<T,TID>.

- 0of 0 votes
Write SQL query to get the earliest flight from A to B.

- 0of 0 votes
I want to run a function that does that automatically for me until the condition is complete (condition is some update statement),if i have 2000 records and exit when condition should be counter<500;

so if i have 2000 records so counter will be 2000/500 =4

loop will execute for 4 times

update statement should consist of

update tablename set counter=1 where rownum<500

this process continues until the update condition is met

- 0of 0 votes
Given an array of integers, rearrange the array in such a way that the first element is first maximum and second element is first minimum.

Input : {1, 2, 3, 4, 5, 6, 7}

Output : {7, 1, 6, 2, 5, 3, 4}

- 0of 0 votes
What technology is used by Autoportal.com to store there huge Databse?

- 0of 0 votes
You have a farm of 400m * 600m where coordinates of the field are from (0, 0) to (399, 599). Some part of the farm is barren. All the barren land is in form of rectangles. Due to these rectangles of barren land, the remaining area of fertile land is present in form of holes in the farm. Each hole is a maximal area of land that is not covered by any of the rectangles of barren land.

Input

You are given a set of rectangles that contain the barren land. Each String in rectangles consist of four integers separated by single spaces, with no additional spaces in the string. The first two integers are the coordinates of the bottom left corner in the given rectangle, and the last two integers are the coordinates of its top right corner.

Output

Output all the holes’s area in square meters, sorted from smallest area to greatest, separate by space.

Sample Input/ Output

Sample Input Sample Output

{“0 292 399 307”} 116800 116800

{“48 192 351 207”, “48 392 351 407”, “120 52 135 547”, “260 52 275 547”}

22816 192608

Deliverables – the code below or similar structure

import java.io.*;

public class Solution { public static void main(String args[] ) throws Exception { /* Enter your code here. ead input from STDIN. Print output to STDOUT */ }}

- 0of 0 votes
How to sort an array of integers using two priority queues ?

- 0of 0 votes
This was design question.

I have a single timer class which is running on a single port of a machine.

There are multiple clients that can send request to this timer class as follows.

request_timer (x)

where x is time in seconds.

when the timer class gets this request from a client it starts a timer object of x seconds and after x seconds are over it sends an event to the requesting client and client can handle the event the way it wants to .

The problem is if you have large number of clients then the timer class is single point of congestion and the clients may receive the event from it after a long time.

What are the good ways to scale this for a large number of clients?

- 0of 0 votes
A parent array P is given where P[i] denotes the parent of the ith node in the tree(the tree is generic). Parent of root is indicated with -1. I need to find the height/depth of tree. (Best sol in O(n))

- 0of 0 votes
Table 1; transaction_id, price

Table 2: transaction_id, zipcode

Query to find the avg price per zipcode

Query to show zipcodes that have an avg price more than $5.

- 0of 0 votes
Ebay lowers its listing fee for one of the product ( bikes), and sees an increase in avg sales price. Explain why?

- 0of 0 votes
What is difference between Having and where clause?

- 0of 0 votes
Design a phone book such that fields are searchable with name , with number. Later enhanced teh question asking searchable with address as well.

- 0of 0 votes
An analyst at Amazon is conducting a satisfaction survey, sampling from a list of 10,000 new users. The list includes 2,500 French users, 2,500 German users, 2,500 Italian users, and 2,500 Portuguese users, The analyst selects a sample of 400 users, by randomly sampling 100 users of each country. Is this an example of simple random sample?

- 0of 0 votes
I applied online through Amazon page, and they contacted me right immediately like on that day which was scary for me. I guess they embody truly the culture of moving fast. I got an e-mail with to complete some online test with 13 questions and they were on:

13 questions:

9 Analytical Multiple Choice Questions – focusing on sets, trend analysis, calculus, stats, etc.

1 open ended basic SQL question.

1 open ended normalization question.

1 Multiple Choice English language comprehension question.

1 open ended language question (this part should be 200 – 300 words).

The entire online assessment test was conducted through hackerrank.com and it was for 90 min.

Personally I did not go and complete the Quiz within couple of day. I did take my time to prepare and I was right. It is a difficult test. I did use apps like ‘the impossible interview’ and ‘the aptitude interview’ from iTunes app store to prepare. They were a help.

- 0of 2 votes
How to design a multi key hash map ( key count can be dynamic. if there are two keys , initiallly which can be used to find the value , keys can be increased to three as well ex: consider school structure. Intially , consider , student id is key , later , should be searchable even with key name , later with grade.

- 1of 3 votes
Design a telephone directory for large ppl (he gave example like design for India). fields will be , first name , last name , number . this should be searchable with first name , last name , number as welll.

later added more complexity like do the same for organisation where even it contains designations. so this should be searchable with designations.

- 0of 0 votes
Suppose an Archeologist is visiting Africa, who don't know the native language. There are two tribe, one of those always speaks the "Truth" and another one always speaks "Lie". Suppose you are in front of three such people, of course you don't know them as truth/lie speaking tribe. You asked a question, and the 1st one replies in his native language, which you don't know, then 2nd tells that the 1st person is lying(in english) and the third person tells that 2nd person is lying(in english).

Which tribe does the 3rd person belongs?

- 0of 0 votes
`public class Gen { public static void main(String[] args) { Integer i1 = new Integer(1); Integer i2 = new Integer(1); System.out.println(i1 != i2); System.out.println(i1 <= i2); System.out.println(i1 >= i2); } }`

WHY THE OUTPUT IS TRUE IN ALL CASES?

- 0of 0 votes
Given a list of 'N' coins, their values being in an array A[], return the minimum number of coins required to sum to 'S' (you can use as many coins you want). If it's not possible to sum to 'S', return -1

Example:

Input #00:

Coin denominations: { 1,3,5 }

Required sum (S): 11

Output #00:

3

Explanation:

The minimum number of coins requires is: 3 - 5 + 5 + 1 = 11;

- 0of 0 votes
Basically I know that 378 small sheets were printed. These came from 21 full sized sheets of paper. The large sheets of paper were torn, leaving rough edges that can be put re-joined digitally. I have now recorded 60 different sheets, and have joined only five pairs. What I would like to know is what is the likely number of sheets that the five pairs came from of the 21 originally used.

- 0of 0 votes
This is a hardware design problem. I can not figure it out. Suppose we have 2 pipelined hardware multipliers(or something). One is working at 1GHz with 2 operations executed in parallel at the same time. The other one is at 500GHz with 4 operations. Suppose we have transistors of 3 types(low leaky(30%),middle leaky(50%) and high leaky(70%)) and here leaky means leakage power of the transistor. Which multiplier should we use considering the 3 types of transistors.

- 0of 0 votes
The strength of a pair integer sequences is defined by the number of integers that they have in common. You are required to find the strength of several pairs of integer sequences.

INPUT

The first line of input contains T, the number of test cases. T test cases follow. Each test case contains 3 lines. The first line contains two integers N and M, which are the lengths of the two sequences. The next two lines contain the sequences.

OUTPUT

This should contain T lines, each containing an integer representing the strength of the pair of sequences for the corresponding test case.

CONSTRAINTS

The length of each sequence will be between 1 and 20 inclusive

A sequence can contain an integer between 1 and 100 inclusive

Sequences will not contain duplicate integers

SAMPLE INPUT

3

4 4

1 2 3 4

3 4 5 6

4 5

1 2 3 4

1 2 3 5 6

3 4

1 2 3

5 6 7 4

SAMPLE OUTPUT

2

3

0

- 0of 0 votes
The binary weight of a positive integer is the number of 1's in its binary representation. For example, the decimal number 1 has a binary weight of 1, and the decimal number 7 (which is 111 in binary) has a binary weight of 3.

Given a positive integer N, find the smallest integer greater than N that has the same binary weight as N.

INPUT

The first line of input contains a number T the number of test cases. The next T lines contain a number N.

OUTPUT

For each test case output a line containing the smallest number greater than N which has the same binary weight as N.

CONSTRAINTS

1 <= N <= 10000

SAMPLE INPUT

2

3

7

SAMPLE OUTPUT

5

11

- 0of 0 votes
Given an integer N, find the smallest integer greater than N which is prime.

INPUT

The first line of input contains T, the number of test cases. T test cases follow. Each test case contains a single integer N.

OUTPUT

This should contain T lines, each containing the smallest prime integer greater than N.

CONSTRAINTS

1 <= T <= 5

1 <= N <= 100

SAMPLE INPUT

2

6

11

SAMPLE OUTPUT

7

13

- 0of 0 votes
Dart thrown land up uniformly and random at a distance from centre of a unit circle. Distance from center is in the range [0,1]. One who lands up farther from the center loses and the loser pays amount equal to distance from the centre. What is the expected pay?

- 0of 0 votes
Whats wrong in this code?

#include<stdio.h>

#include<stdlib.h>

void mystrcpy( char *string2 ,char *string1 )

{

string2 = malloc(20);

while( *string1 != '\0')

{

*string2++= *string1++;

}

}

int main()

{

printf("****************program starts*************************");

char *str1 ="hello world";

char *str2 =NULL;

mystrcpy( str2,str1);

printf("string1 = %s string2 =%s ",str1,str2) ;

getche();

return 0;

}

why str2 will print NULL here