Phone Interview Questions
There is stream of float values (-inf, inf) which is coming as input and an integer D.
We need to find a set of 3 values which satisfy condition - |a - b| <= D, |b - c| <= D, |a - c| <= D, assuming a,b,c are 3 float values. Print these 3 values and remove them and continue ....
Constraints - All values in stream will be unique. D -> [0, inf)
Eg: Input stream - [1,10,7,-2,8,....], d = 5 Output - (when 8 comes, then print "7 8 10" and remove them and continue)
What data structure should be used here, and what approach can be applied? (Link)
Given one struct of time interval with using that i have to return in bool that are they overlapping 2 intervals or not. struct TimeInterval{ int id ; int startTime; int endTime; }; bool overlapping( TimeInterva t1, TimeInterva t2){} (Link)
Given stream of time interval tell that min how many cars will be used to book for all timeintervals;
Given : {{1,3}, {2,5},{6,8},{7,10},{9,10}} output : car1 : {1,3},{6,8},{9,10} car2 : {2,5},{7,10} (Link)
Imagine we have google drive in Some other country and your code is running in another country.
(Link)
https://leetcode.com/discuss/interview-question/5075278/Google-Phone-screen inputs:
Function signature
Return how many distinct combinations (length of 3) we can create. Distinct - order matters [0, 1, 2] [2, 0, 1] is distinct. [0, 1, 2] [0, 1, 2] not distinct E.x
You are given n fingerprints from 0 , 1 ,2 , 3.....(n-1). One has to generate a password of length n or greater than n, such that every fingerprint should be utilised atleast once. Write a general function, where you are given number of fingerprints and password length and print all the possible passwords.
Last updated