.Net/C Interview Questions
- 0of 0 votes
AnswersWAP to create two threads . One threads check whether
- computersengineers43 April 01, 2020 in United States
the number is even or odd while the second threads finds factorial of a numbers.| Report Duplicate | Flag | PURGE
Algorithm - 0of 0 votes
AnswersWhy Google Duo Not working on iPhone?
- simmigravey March 25, 2020 in United States| Report Duplicate | Flag | PURGE
Tracingpage Problem Setter Google Duo Not Working - 0of 0 votes
AnswersHow to Change Allegiant Air Flight?
- Robert Musk March 25, 2020 in United States| Report Duplicate | Flag | PURGE
travelservicesforyou Site Manager Allegiant Air Flight Change - 2of 2 votes
AnswersI was asked to sort extra large file 10GB which contains single word in each line, within 4GB RAM. I told External sort and optimised it with min-heap but interviewer was asking to optimise disk I/O. As last he told that use CS fundamentals. Don't know what was he expecting. Please help.
- sulabh.shkl March 22, 2020 in India| Report Duplicate | Flag | PURGE
Microsoft Software Developer Algorithm - 0of 0 votes
Answersdeadlock detection is an important consideration in operating system of computer.In this problem you will be given a directed graph representing the state of the system.Your program should detect the whether there are any deadlocks in the system(A deadlock can be created by checking for the cycles in the graph
- swetankkanaujiamk March 21, 2020 in United States
the input will be in the form
process X holds sources Ri and wants resources Rj ( X holds the Rj means an edge Ri->X and X wants Rj means an edge X->Rj).Note that both processes and resources form nodes of the graph.
Use depth first traversal to determine whether they are the cycles in the graph.The graph contains a cycle if while expanding a node ,you encounter a child that is represent in the path from the root of the current tree to the node being expanded .You can assume that the maximum number number of nodes in the graph will not exceed 50| Report Duplicate | Flag | PURGE
C++ - 0of 0 votes
Answersrain strikes and the roads are flooded .Mr x has to get home from work.your task is to make sure he returns home in the shortest time .consider the roads as a graph with crossing as nodes and the path between two nodes as an edge. SAssume the graph is unidirected and the numbers are numbered .1 to v(v<=50)
- swetankkanaujiamk March 21, 2020 in United States| Report Duplicate | Flag | PURGE
Data Structures - 1of 1 vote
Answersfind the maximum length subarray condition 2 * min > max
- samayragoyal990 March 16, 2020 in India| Report Duplicate | Flag | PURGE
Adobe Backend Developer Arrays Coding - 0of 0 votes
AnswersDetect a horizontal line in a bitmap image. Assume there will be some utilities to process the black and white image. you just need to process the utility output and return the start and end indices of the horizontal line if any.
- ammuz February 17, 2020 in Germany| Report Duplicate | Flag | PURGE
Google - 0of 0 votes
AnswersGiving an array of stock prices, find an algorithm of a maximum profit of a series of transactions with a constraint of purchasing one unit at any purchasing transaction.
- fz February 14, 2020 in United States
For example, stock prices
{5, 6, 3, 5, 4, 6, 7}
The transaction sequence would be the following for a maximum profit:
buy on the first day(price 5) and sell on the second day (price 6)
buy on the third day (3) and sell on the 4th day (price 5)
buy on the 5th day and sell on the 7th day (price 7)| Report Duplicate | Flag | PURGE
Software Engineer Algorithm - 0of 0 votes
AnswersA 2d array has 0 and 1 as values. In one flip, 0's are changed to 1 if and only if any of the neighbors (left, right, top, bottom) is 1. Return the total number of flips required to convert the whole grid to 1's
- abhi.mathur.us February 11, 2020 in United States| Report Duplicate | Flag | PURGE
Amazon SDET - 0of 0 votes
AnswersHi, first of all I want to say thanks to Gayle for the awesome work on the book and online resources. I was reading the introduction section of CtCI and I have a doubt regarding the "remote" preparation to the interview. I see that getting an internship as soon as possible seems to be very important, but I don't understand one thing.
- crackingtothegate February 11, 2020
If one is not able to land an internship at a top company like Google or Microsoft early on, would it be better to still do one at a worse company (like a "consulting" firm or less renown company) or at this point dedicating to personal projects that are more interesting that the job you would do there would be evaluated more?
Also, how should a student not in his final year prepare to be admitted to an internship? I've read that internship selection processes can be pretty selective already, and you wouldn't even have the previous internships as a plus on your resume.| Report Duplicate | Flag | PURGE
Student Experience - 0of 0 votes
AnswersGiven a set of integers, the task is to divide it into two sets S1 and S2 such that the absolute difference between their sums is minimum.
- Anon February 09, 2020 in United States
If there is a set S with n elements, then if we assume Subset1 has m elements, Subset2 must have n-m elements and the value of abs(sum(Subset1) â sum(Subset2)) should be minimum.| Report Duplicate | Flag | PURGE
Salesforce Software Engineer - 0of 0 votes
AnswersIntelligent Substrings:
- himatNIT February 09, 2020 in United States for Hacker rank test
There are two types of characters in a particular language: special and normal. A character is special if its value is 1 and normal if its value is 0. Given string s, return the longest substring of s that contains at most k normal characters. Whether a character is normal is determined by a 26-digit bit string named charValue. Each digit in charValue corresponds to a lowercase letter in the English alphabet.
Example:
s = 'abcde'
alphabet = abcdefghijklmnopqrstuvwxyz
charValue = 10101111111111111111111111
For clarity, the alphabet is aligned with charValue below:
alphabet = abcdefghijklmnopqrstuvwxyz
charValue = 10101111111111111111111111
The only normal characters in the language (according to charValue) are b and d. The string s contains both of these characters. For k = 2, the longest substring of s that contains at most k = 2 normal characters is 5 characters long, abcde, so the return value is 5. If k = 1 instead, then the possible substrings are ['b', 'd', 'ab', 'bc', 'cd', 'de', 'abc', 'cde']. The longest substrings are 3 characters long, which would mean a return value of 3.| Report Duplicate | Flag | PURGE
Linkedin SDE1 - 0of 0 votes
AnswersI'm going to have a webinar in join.me All software can be shared except pvsyst software The time to share the black screen is shown
- Nike.hoss@yahoo.com February 05, 2020 in -| Report Duplicate | Flag | PURGE
techsupport - 0of 0 votes
Answera matrix contains positive integer numbers.
- amitaiweil February 03, 2020 in United States
Each column and row, which contains zero should be reset all to 0.
(The reset column/line should be skipped while iteration)
Is there a way in C for doing this without using another temp full array for knowing where the zero's which have been found exist?| Report Duplicate | Flag | PURGE
None None C - 0of 0 votes
AnswersGiven two sorted arrays, the task is to merge them in a sorted manner.
- Nits January 30, 2020 in United States| Report Duplicate | Flag | PURGE
Brocade Software Trainee - 0of 0 votes
AnswersYou are given a list of n-1 integers and these integers are in the range of 1 to n. There are no duplicates in the list. One of the integers is missing in the list. Write an efficient code to find the missing integer.
- Nits January 30, 2020 in India| Report Duplicate | Flag | PURGE
Deshaw Inc Tech Lead - 0of 0 votes
AnswerWrite an efficient program to find the sum of contiguous subarray within a one-dimensional array of numbers which has the largest sum.
- Nits January 30, 2020 in United States| Report Duplicate | Flag | PURGE
Akamai Research Scientist - 1of 1 vote
AnswersGiven an unsorted array A of size N of non-negative integers, find a continuous sub-array which adds to a given number S.
- Nits January 30, 2020 in United States| Report Duplicate | Flag | PURGE
Amazon Dev Lead - 0of 0 votes
AnswerCount Triplets such that one of the numbers can be written as sum of the other two
- Nits January 30, 2020 in India| Report Duplicate | Flag | PURGE
Grab Software Development Manager - -2of 2 votes
AnswersFor Fun
- rihanakhan07 January 20, 2020 in India for Fun Team| Report Duplicate | Flag | PURGE
Digital Merkating Analyst - -1of 1 vote
AnswersAgree
- rihanakhan07 January 20, 2020 in India for Fun Team| Report Duplicate | Flag | PURGE
Digital Merkating Analyst - 0of 0 votes
AnswersThe question is basically on trees
- Noob January 19, 2020 in United States
1
2 3
4 5 6 7
You can lock any node, Once the node is locked all the ancestors and descendents of that node are also locked. You cannot acquire a lock on a node which is already locked.
You can unlock the node on which you have acquired a lock.
Implement it using multithreading.| Report Duplicate | Flag | PURGE
AMD Algorithm - 0of 0 votes
AnswersRakesh and mahesh are brothers born in may
- Stubborn January 18, 2020 in India
But they celebrate their birthday in june
Why so??
Hint: Name does'nt matter u can take any other names| Report Duplicate | Flag | PURGE
- 5of 5 votes
AnswersGiven K sorted (ascending) arrays with N elements in each array, implement an iterator for iterating over the elements of the arrays in ascending order.
The constructor receives all of the input as array of arrays.
You need to implement the MyIterator class with a constructor and the following methods:class MyIterator<T> { T next(); boolean hasNext(); }
You are allowed to use only O(K) extra space with this class.
example:
input:[[1,5,7], [2,3,10],[4,6,9]]
The iterator should return:
- torchs January 13, 2020 in Israel1,2,3,4,5,6,7,9,10
| Report Duplicate | Flag | PURGE
Facebook Solutions Engineer Algorithm - -1of 1 vote
AnswersGiven an array of sets find the one that does not belong:
- billybill January 03, 2020 in United States
example: [[a,b,c,d], [a,b,f,g], [a,b,h,i], [j,k,l,m]]
output: [j,k,l,m]
We can see above that the first three sets have a subset [a,b,c] and the last one does not. Note: There may be a case where the outlier set does have elements contained in the input group. In this case we have the find the set that has the least in common with the other sets.| Report Duplicate | Flag | PURGE
Google Software Engineer Sets - 0of 0 votes
AnswerProblem:
- giridharikhandelwal1 January 03, 2020 in India
1. Given a Mix of all types of characters which includes Special characters, Numbers, String in a Log file.
for eg: "HappyI%&&87Christmas %%$^%&NewYear"
2. Get the largest substring which
"contains the Characters in Even Position followed by a Special Character and
then a meaningful word should be coming up"| Report Duplicate | Flag | PURGE
Amazon Quality Assurance Engineer Problem Solving - 0of 0 votes
AnswersQ. find the number of ways a string can be formed from a matrix of characters.
- tusharrawat831 December 29, 2019 in United States
It can start forming a word from any position in mat[i][j] and can go in any unvisited direction from the 8 directions available across every cell [i][j].
sample case :
input:
N = 3 (length of string)
string = fit
matrix :
fitptoke
orliguek
ifefunef
tforitis
output: 5
explanation:
num of ways to make 'fit' from matrix chars are 5 as given below sequence:
(0,0) (0,1)(0,2)
(2,1) (2,0)(3,0)
(2,3) (1,3)(0,4)
(3,1) (2,0)(3,0)
(2,3) (3,4)(3,5)
How can we solve it efficiently without doing DFS across every position [i][j], which makes time complexity exponential?
Is there a better way possible in terms of time complexity? Maybe caching of values or something!| Report Duplicate | Flag | PURGE
Software Engineer Algorithm - 1of 1 vote
AnswersThere is a 2D matrix of 0s and 1s that depicts the number of rooms that can be formed by a co-working space company like WeWork based on the values. 1 means open space for room and 0 means wall. We need to group as many 1s and possible to form the largest and minimum number of rooms.
- Jigisha Aryya December 25, 2019 in India
E.g.
Number of Rows = 5, Number of Columns = 5
00010
01110
01100
01101
00011
Output: 4
Input 2:
4
3
001
111
011
100
Output: 4| Report Duplicate | Flag | PURGE
unknown Backend Developer Algorithm
Open Chat in New Window