Question 1:
https://leetcode.com/problems/custom-sort-string/
Given one string ('abbceeeg') sort it based on another string ('egbca')
Result will be: 'eeegbbca'
Solved in nlog(n) and O(n) space. Was hinted there could be better run time. Struggled for a bit, was asked to code nlog(n). During the final step realized that right now my solution could blow up to O(n^2). Mentioned it. Was told "that's a good observation. Can you still stick to nlog(n)?" Managed to do it by introducing another data structure, thus, bringing space complexity to O(2n). At the end was told it's ok
Didn't solve efficiently. The link above has a nice solution with a set. I did with a dictionary (excessive) and didn't have enough time to dry run it but was told that the solution "looks reasonable and accurate."
Thank god i'm not a programmer and don't have to do programming interviews anymore