First Question:
Wifi Router Problem
https://leetcode.com/discuss/interview-question/1643403/Amazon-OA-SDE-1
Came up with suboptimal solution which passed all test cases except the cases which check time complexity. So 11/15
Second Question:
Given a list of process with process id and memory requirement, these process are seprated into two lists foregroundProcess List and backgroundProcess list . Ex : int[][] fg = {{1,3},{2,2},{3,3},{4,5}} , int[][] bg = {{1,6},{2,3},{3,4}}. Along with this, deviceMemory is given. Find the pairs of foreground and background process which use the memory of device optimally i.e., fg[i][1] + bg[i][1] <= deviceMemory.
Found Optimal O(n) solution by using hashmaps of the bigger Process list to do fast lookups. So you can solve it like the sum of two integers problem.
Important Edge Case: The sum of the min values from both process list is bigger then deviceMemory => No Solution
Passed all test cases.