Amazon | OA US May 2022 | SDEII
Anonymous User
4145

#2 Coding Questions for AWS Online Assessment

#1 Maximum Subarray Length (LC Medium) - Find a subarray of maximum length such that product of all the elements in the subarray is 1.
Example: [1, -1, -1, 1, 1, -1] - Output (Max length): 5

#2 Frequency Deviation of Substring (LC Hard) - Find the maximum possible frequency deviation of any substring of the string.
Example: string s = "aabb" - Output (Freq range): 1

Concrete solutions or link to LC would be much appreciated!

Comments (6)