Amazon interview question

1. bin question - easy one 2. leetcode #2398