Analyst Interview Questions
0of 0 voteswhat is the difference?
void test(vector<int> vec)
{
//ptint the vec;
}
void test(const vector<int> &vec)
{
//print the vec;
}
1of 1 votewhat is the probability of 5 people with different ages sitting in ascending or descending order at a round table.
3of 3 votesGiven list of pounds, the pounds that can be measured using a balance should be displayed.
For Ex: 100,250
The output will be 100,250,150
The number of pounds which will be given in input might vary. Can someone please help with an algorithm for this?
0of 0 votesWe have array that contain integer number, I would like to find the numbers that repeated k time in this array. The array is not sorted, and the numbers are not bounded.
Example,
A(20, 6, 99, 3, 6, 2, 1,11,41, 31, 99, 6, 7, 8, 99, 10, 99, ,6)
Find the numbers repeated more than 3 times.
Answer: 6,99
possible answer using bit wise operations (xor) or combination? Efficiency in running time Big(o) is required as well as the space capacity.
0of 0 votesGiven that a disk page can hold at most 1K bytes, a search key uses 4 bytes, and a pointer uses 4 bytes.
Can we analyze the size of an expendable hashing index to index a table column which is defined using unique constraint. What would be the minimum and maximum size of the expendable hasting index if the bucket address table is fully extended?
0of 0 votesThe company is currently traded at EV/EBIDA = 5.0x, EBITDA = $120 mln. The company is planing SPO of $120 mln, where $80 mln - secondary shares (current shareholder X sales his stake - 20% of equity capital prior to the SPO) and $50 mln - primary shares (new shares issue).
Please calculate: EV an equity value prior and after SPO
0of 0 votesGiven a dataset with three columns: one column shows the account number from which an amount of money is wired, one column shows the account number to which the amount of money is wired, and three shows the amount of the transfer. Design an algorithm to make a new dataset with three columns such that the first column is the account number, the second column is the TOTAL amount of money transfered to the account, and the third column is the TOTAL amount of money transferred from the account.
0of 0 votesWhat is the difference between template class and class template ???
0of 0 votesThere is given a string array and strings having names
for eg . careercup , career , dewdeals , onlineshopping
You have to create a program that finds the largest string in given string array
0of 0 votesfind the number of occurrence of given sum in array
EX: input : 10 5 3 2 sum=15
output: 2
it means 15=10+5
15=10+3+2
0of 0 votesDescribe an algorithm to solve the following problem. Given an undirected graph G =
(V, E) and a vertex v, compute for each vertex w in the graph G the number of shortest
paths from v to w. Can we do it in O(|V| + |E|) ?
0of 0 votesAn cellphone company provides service on 7 different frequencies. They have fixed the locations of 100 towers for their new service. The company has to ensure that two towers broadcasting on the same frequency are at least 100 km apart, so that there is no interference of signals. Describe an algorithm which will answer “feasible” if it is feasible, otherwise output the minimum
number of frequencies needed to utilise all 100 towers.
0of 0 votesGiven an undirected graph. Each vertex has degree at most 5. Give an algorithm to find the largest clique in G. What will be the complexity ?
Only designing idea will be sufficient.
0of 0 votesYou play a dice rolling game, you have two choices:
1. Roll the dice once and get rewarded the amount of $ equal to the outcome number (e.g, $3 for number "3") and stop the game;
2. You can reject the first reward according to its outcome and roll the dice the second time and get rewarded in the same way and stop the game.
Which strategy should you choose to maximize your reward? (that is what outcomes of the first roll should make you play the second game?)
What is the statistical expectation of reward if you choose that strategy?
0of 0 votesQueue. Implement a queue
0of 0 votesBinary Tree. How will you implement Binary tree
0of 0 votesWhat is Inner Join, Left outer join. What is a view
0of 0 votesWrite a sql query to select duplicates in a Table.
0of 0 votesExplain virtual function, up-casting and applications?
0of 0 votesHow will you restrict the memory allocated to a program by an operating system ?
0of 0 votesWrite a C function to reverse a string given just two character pointers along with the input string.
0of 0 votesHow to find duplicate element (only one element is repeated) from an array of unsorted positive integers..
time complexity .. O(n)
space .. o(1).
0of 0 votesA common problem is to generate the intersection of two sequences. A sequence is a sorted list of objects that are ordered according to some comparison operation. I need two functions (or one function with some type of switch parameter) that provide an intersection of two sequences. In one case, I want to only output an intersection of the sequence, but if there are duplicate values in the sequence, only output one object. In the other, preserve duplicates. For example, take two sequences:
A: 1, 3, 3, 7, 7, 7, 8
B: 2, 3, 7, 7, 9
The output in the non-duplicate preserving case should be: 3, 7. For the duplicate preserving case, the output should be: 3, 7, 7.
Your solution will be graded on flexibility, robustness, and scalability. You are allowed to create as many classes/objects/templates/etc that you need. Document your code as you would for real-world maintainability. You can use STL concepts, but the STL is unavailable to you.
The definition of a sequence and/or iterating through a sequence is not provided to you as part of this test question. It is up to you to determine how you want callers to pass in a sequence and how the caller will receive output. The solution should be flexible enough that the caller can easily adhere to a sequence definition, and once you have specified the API, assume that callers will provide a sequence in sorted order. If the caller does not adhere to your pre-conditions, it is the caller's fault, not yours (i.e., you don't have to test that a sequence is sorted). But, do try and make it easy enough for a caller to reuse.
0of 0 votesGiven an array of unsorted integers , how to find duplicates in O(n)
0of 0 votesgiven an array , find three numbers a,b and c such that a^2+b^2=c^2 ..
I have given algo of o(n^2) complexity. But he is expecting still better algo.
0of 0 votesGiven an array of integers. Each number in the array repeats ODD number of times, but only 1 number repeated for EVEN number of times. Find that number.
0of 0 votesGiven a binary tree ,Find the minimum sum from root to the leaf and also the path???
0of 0 votesGiven two nodes of tree .Find their first common ancestor???
0of 0 votesGiven 3 tables: Employee (empid, empname), Employee_timesheet(empid, no_of_hours, date), Employee_hour_rate (empid, hour_rate). Calculate pay check of all employees on monthly basis.
0of 0 votesWhat is virtual function?
