samayragoyal990
BAN USER- 1of 1 vote
Answersfind the maximum length subarray condition 2 * min > max
- samayragoyal990 in India| Report Duplicate | Flag | PURGE
Adobe Backend Developer Arrays Coding - 1of 1 vote
Answers// For a given vector of integers and integer K, find the number of non-empty subsets S such that min(S) + max(S) <= K
- samayragoyal990 in United States
// For example, for K = 8 and vector [2, 4, 5, 7], the solution is 5 ([2], [4], [2, 4], [2, 4, 5], [2, 5])
The time complexity should be O(n2). Approach and code was asked| Report Duplicate | Flag | PURGE
Google Software Engineer / Developer - -1of 1 vote
Answerwrite a main program to take snapshots of VMs
- samayragoyal990 in United States
Input: List of VMs(vmId: String), list of SLAs -> there is one-to-one mapping from VM to SLA
class SLA {
int freq_in_mins;
}
vm1 -> sla1{30 mins}
vm2 -> sla2{60 mins}
Constraints:
1) You can use takeSnapshot(vmId: String) -> Synchronous - I/O
2) If you start a snapshot of VM(with sla1) at time t0 and if it finishes at time t1, then the next snapshot should be scheduled at t1+sla1.freq_in_mins
vm1 at 00:00 and vm2 at 00:00
00:10 and 00:15
vm1 -> 00:10 + 30 = 00:40| Report Duplicate | Flag | PURGE
Google SDE-3 Coding
This prints 4 , but the actual answer is 5 in the above example.I think instead of ++count we should increment count by j-i diff
- samayragoyal990 February 24, 2019Can u please share ur code :) I want to see the handling of overflow mainly
- samayragoyal990 August 11, 2018
Use md5sum?
- samayragoyal990 March 16, 2020