ashishsaraswat.iips
BAN USER- 0of 0 votes
Answersdesign an employee swap in swap out system.
- ashishsaraswat.iips in India
The system will have a machine which records the swap in and swap out.
The user can also login in a portal where he can check his swap in /swap out time. He can correct his time also.
There will be managers for employee who can check the entry for all the employees which are under them and correct their subordinates timings also
There will be HR who can only view the entries for all the employees.
We have to come up with the HLD and LLD for the system| Report Duplicate | Flag | PURGE
Amazon SDE-2 System Design - 0of 0 votes
AnswersGiven a method
- ashishsaraswat.iips in India for AdsWorld
public int getOccurence(int x,int y);
where y is always a single digit number.
So find the number of occurrences of number y in the range x
E.g.
if x=25,y=2
function should return 9(as 22 contains two occurrences of 2) - 2,12,20,21,22,23,24,25| Report Duplicate | Flag | PURGE
Google SDE-2 - 1of 1 vote
AnswersFind two strings are meta string or not
- ashishsaraswat.iips in India
for eg:-
Converse
Conserve
are meta strings because if we swap s and v in the string both string will become equal. If swapping of more than one pair can be done then it is not a meta string| Report Duplicate | Flag | PURGE
Google Software Engineer - 0of 0 votes
AnswersFind the median of a bst in O(n) time and O(1) space
- ashishsaraswat.iips in India| Report Duplicate | Flag | PURGE
Google Software Engineer - 0of 0 votes
AnswersWrite a program which takes input a sorted array and positive number and updates the array so that if x appears m times in array then it appears exactly min(2,m) times in array. the update should be performed in one pass with no additional memory
- ashishsaraswat.iips in India| Report Duplicate | Flag | PURGE
Amazon SDE-2 Arrays
if an array is {2,2,2,2,3} and the method is editArray(arr[],m)
if m=4
then after the method array should be {2,2,3,0,0}
We have to produce a code , not the code for file related stuff but the code for the sorting the file only
- ashishsaraswat.iips June 20, 2017