Amazon interview question

contains two mid-level coding problems