.Net/C Interview Questions
- 0of 0 votes
AnswersImplement BST Iterator and use them in 2 sum and 3 sums problem on a BST
- neer.1304 July 22, 2019 in United States| Report Duplicate | Flag | PURGE
Rubrik - 0of 0 votes
AnswersImplement a rate limiter that multiple threads can use, while the global rate is limited to a value
- neer.1304 July 22, 2019 in United States| Report Duplicate | Flag | PURGE
Rubrik Coding - 0of 0 votes
AnswersImplement a thread-safe data structure which can keep track of number of incoming
- neer.1304 July 22, 2019 in United States
requests grouped by IP Address over a time window. Add support for grouping by other
attributes such as BrowserAgent.| Report Duplicate | Flag | PURGE
Rubrik Algorithm - 0of 0 votes
AnswersGiven a string select two non-overlapping strings that are same and remove them. Perform this operation recursively till there are no desired strings.
- neer.1304 July 20, 2019 in United States
Print the number of possible substring after completing above operation.
Ex - abcc
Duplicate non-overlapping substring - abc
After removing abc from we are left with 1 substring abc.| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
AnswersIn a 2-D matrix of m*n select m-1 elements from each row such that that the resulting sum is minimum and each column is selected atleast once.
- neer.1304 July 20, 2019 in United States
Ex -
2 3 5
3 2 5
4 4 7
Selecting (2,3) from 1st row, (2,5) from 2nd row and (4,4) from 3rd row would result in minimum sum of 20| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 1of 3 votes
AnswersQuestion: Can you break the given string into words, provided by a given hashmap of frequency of word as <word: n>
- nitinguptaiit July 18, 2019 in United States
Example:
HashMap -> {"abc":3, "ab":2, "abca":1}
String: abcabcabcabca
output: Yes; [ abc, abc, abc , abca ]
Example:
HashMap -> {"abc":3, "ab":2}
String: abcabab
output: No
Example:
HashMap -> {"abc":3, "ab":2, "abca":1}
String: abcx
output: No| Report Duplicate | Flag | PURGE
Facebook Algorithm - 0of 0 votes
AnswersFind LCA for list of nodes of a tree
- neer.1304 July 17, 2019 in United States
Function defined as below -
TreeNode findLCA(TreeNode root, List<TreeNode> nodes)| Report Duplicate | Flag | PURGE
Amazon SDE-2 Algorithm - 0of 0 votes
Answers
- vejon July 16, 2019 in United StatesGiven a number n, make a set of m integers such that the integers lie between [1, n] and the sum of two integers should produce an integer which is in the set. Eg. **Input** n=20, m=5 **Output** [3, 6, 11, 14, 17]
| Report Duplicate | Flag | PURGE
ThoughtWorks Applications Developer - 0of 0 votes
AnswersWhich test types we can use for drinks vending machine testing? Especially for check dimension, length, appearance of machine and cups?
- lolkaolig July 14, 2019 in United States| Report Duplicate | Flag | PURGE
Testing / Quality Assurance - 0of 0 votes
AnswerA set of points in the 2D plane. Find the first k number of points with the shortest distance to the point (0, 0), where k is a positive integer.
- fz July 13, 2019 in United States
e.g.
Input
{[-16, 5], [-1, 2], [4, 3], [10, -2], [0, 3], [-5, -9]}
k = 3
Output:
{[-1, 2], [0, 3], [4, 3]}
.| Report Duplicate | Flag | PURGE
Algorithm - 0of 0 votes
AnswersA matrix represents a sequence of travel points. One only can travel either left/right or up/down. Some of those points are dead points which one can't travel any further. There is a destination point in the matrix. Find the shortest path from the top left point (1, 1) to the destination.
- fz July 13, 2019 in United States
e.g.
Input
[
[‘O’, ‘O’, ‘O’, ‘O’],
[‘D’, ‘O’, ‘D’, ‘O’],
[‘O’, ‘O’, ‘O’, ‘O’],
[‘X’, ‘D’, ‘D’, ‘O’],
]
Output
Route is (0, 0), (0, 1), (1, 1), (2, 1), (2, 0), (3, 0) The minimum route takes 5 steps.| Report Duplicate | Flag | PURGE
Algorithm - 0of 0 votes
AnswersI was asked to integrate linkedIn and dropbox. So linkedIn is not into file storage system, hence they want to use the services of dropbox. The goal is to create, update, delete the documents of a profile in linkedIn. But these documents will not be stored in linkedIn. They will be stored in dropbox.
- subhranshu.chatterjee July 13, 2019 in India
Moreover, to get this integration, linkedIn does not want to scale up they system. This means, if they have 400 servers, they do not want to add any more servers to achieve the integration.
How can I design this?| Report Duplicate | Flag | PURGE
Microsoft Software Development Manager System Design - 0of 0 votes
AnswersGiven a positive integer array and a positive integer. Find a pair of integers in the array so that the sum of the pair is the largest one among all pairs not larger than the given integer.
- fz July 12, 2019 in United States
e.g.
Input
{90, 85, 75, 60, 120, 150, 125}
d: 250
Output:
{90, 125}| Report Duplicate | Flag | PURGE
Algorithm - 0of 0 votes
AnswerDesign DB schema for maintaining e-commerce various category ,sub category ,sub-sub category and so on.
- neer.1304 July 12, 2019 in United States| Report Duplicate | Flag | PURGE
Boomerang Commerce Database - 0of 0 votes
AnswersWrite a program to find number of words in a file not using any standard tokenizing API's.
- neer.1304 July 12, 2019 in United States| Report Duplicate | Flag | PURGE
Boomerang Commerce Algorithm - 0of 0 votes
AnswersGiven n, you will be getting stream of sets each set may contain like (1,3,4,5) which signifies that 1,3,4,5 are related. Similarly you may get like (6,7) , (1,8).
- neer.1304 July 12, 2019 in United States
And you will be asked to find whether 1 & 4 are related => Yes (as they are from same set).
3 & 8 are related => yes as 8 & 3 are related through 1.
5 & 7 are related =>No| Report Duplicate | Flag | PURGE
Boomerang Commerce Algorithm - 1of 1 vote
AnswersCard Game
- acoding167 July 12, 2019 in United States
Card game rule: the hand is drawn from a pack of cards (no jokers).
Play cards ONLY when they are
1. 3 of a kind ('AAA' ) or 4 of a kind('AAAA’).
2. a straight flush of 3 or more cards('JQK' or 'A23456...' in the same suit).
Find out whether the player is able to play the whole hand given.
e.g. [Spade A, Spade K, Spade Q, Diamond Q, Heart Q] return false.
[Spade A, Spade K, Spade Q, Diamond Q, Heart Q, Club Q] return true.| Report Duplicate | Flag | PURGE
Google Software Engineer - 1of 1 vote
AnswersShopping Cart Programming test.
- Vimal July 11, 2019 in India
There are multiple types of customer(Regular, Premium) they have been given a discount based on their purchase amount. for e.x
Premium Customer
1) 0-$5000 0%
2) $5000-$10000 10%
3) 10000 - above 20%
Regular Customer
1) 0-$4000 10%
2) $4000 - $8000 15%
3) $8000 - $12000 20%
4) $12000 - above 25%
Read input from console:
Input:
Regular
$5000
Output:
$5000
Input:
Premium
$7000
Output
$8000| Report Duplicate | Flag | PURGE
CDK Global Backend Developer Java - 0of 0 votes
AnswersImplement a function which accepts a number and returns top 10 big numbers the function is called with so far;
- vasa.v03 July 10, 2019 in India
If we call the function with 1.. to 100 , for the call function(100) the function will return 91 to 100 in reverse order since they are top 10 biggest number so far| Report Duplicate | Flag | PURGE
British Telecom Software Engineer Algorithm - 0of 0 votes
AnswersImplement a fair mutex
- neer.1304 July 09, 2019 in United States| Report Duplicate | Flag | PURGE
Nutanix MTS System Design - 0of 0 votes
AnswersAn array is called a Good Array if the elements continually increasing or continually decreasing or continually decrease and then increase.
- neer.1304 July 09, 2019 in United States
Question 1: He asked how will you tell whether a given array is a good array or not.
Question 2: Given an array, you are allowed to add any number of values to each of the element. Find the minimum sum of elements that can make the array a good array.| Report Duplicate | Flag | PURGE
Nutanix Algorithm - 0of 0 votes
AnswersA software-based LRU Cache replacement algorithm has to be implemented for a Single Touch/Multi-Touch Cache. Single Touch can occupy at least 30% of the total cache space. A key accessed for the first time will appear in the Single Touch cache. When accessed multiple times, this will be part of the multi-touch cache. Also, multiple threads will access the cache. Following are the functions allowed for cache access.
- neer.1304 July 09, 2019 in United States
1. get(key): returns the value against the key if present else return NULL
2. set(key, value): set the value against the key| Report Duplicate | Flag | PURGE
Nutanix Algorithm - 0of 0 votes
AnswersGiven a tree, and there will be treasure in one of the nodes. We can query any node, it will return the node itself if it contains the treasure or it returns the branch which leads to the treasure. we need to find out the treasure in minimum number of queries.
- neer.1304 July 09, 2019 in United States| Report Duplicate | Flag | PURGE
Nutanix Algorithm - 0of 0 votes
AnswersDesign a jenkins kind of system
- neer.1304 July 09, 2019 in United States| Report Duplicate | Flag | PURGE
Nutanix Software Design - 0of 0 votes
AnswerImagine someone maliciously duplicated every file on your computer, and completely randomized their names and locations on your hard drive. Discuss an efficient way to clean up your drive of all these duplicates.
- neer.1304 July 09, 2019 in United States| Report Duplicate | Flag | PURGE
Nutanix Algorithm - 0of 0 votes
AnswersTwo very very large files F1, F2 containing key, value pairs. Write these key, values to a third file without any duplicates.
- neer.1304 July 09, 2019 in United States| Report Duplicate | Flag | PURGE
Cohesity MTS Algorithm - 1of 1 vote
AnswersDesign real time tail log search
- neer.1304 July 09, 2019 in United States| Report Duplicate | Flag | PURGE
Rubrik MTS Distributed Computing - 1of 1 vote
AnswersBuild a key-value data structure that allows the user to take a snapshot of the data. The user can read the key-value store from any snapshot.
- neer.1304 July 09, 2019 in United States
Structure has the normal key/value like methods plus something like
snapshot = dataStructure.takeSnapshot()
value = dataStructure.get(key, snapshot)
void dataStructure.deleteSnapshot()| Report Duplicate | Flag | PURGE
Rubrik MTS Algorithm - 0of 0 votes
AnswersA table has some number of balls at various positions on a line segment. All are moving with same speed in one or the other direction. Wherever a collision occurs they change direction. A ball falls from the edges of the table. Find the time when all balls fall of the table given initial position of each ball and speeds
- neer.1304 July 09, 2019 in United States| Report Duplicate | Flag | PURGE
Rubrik MTS Algorithm
Open Chat in New Window