Q1. def getShoppingCart(head: SinglyLinkedListNode, queries: List[List[str]]) -> SinglyLinkedListNode:
Something to do with a shopping cart, users should be able to add and remove items from a shopping cart. Was able to do this fairly quickly, didn't really feel like a Leetcode question.
Description: Execute the queries, given the head of a LinkedList. Queries are in the form [[command, value], ...].
Commands are one of:
Queries looked like this:
[["POP_HEAD", "-"], ["PUSH_HEAD". "cherries"], ["PUSH_HEAD", "apples"]]
Q2. def findMiddleMaximumCapacity(arr: L:ist[int]):
This one made me stuck trying to find an efficient solution. I was able to find a semi-efficient way by starting at the end of the array and move pointers leftward, but failed 2 or 3 test cases.
Description: Given an array of integers of length n, find the highest middle value of a triplet. Say a, b, c are indexes of the array. The following rules must be followed to be considered a valid triplet:
Example:
boxes = [1, 2, 6, 4, 103, 107, 1024]
output = 4
Possible triplets are (1, 2, 6), (1, 2, 1024), (2, 4, 1024). Looking solely at the middle value of the possible triplets, we can see that 4 is the maximum middle value
Overall thoughts:
I did around 35 of the blind75 before doing the OA. I missed 1 test case on Q1 (no clue why) and 2/3 on Q2 (missed the first requirement); spent way too long reading the actual question than doing it. Preeetty sure I failed which sucks because these were pretty easy questions compared to the other OAs I've seen.
Update: Invited to final interview but no invite link yet because of delays.
"You should be hearing from us soon! At the moment, we have a high volume of candidates in process and we are experiencing delays" - Amazon