Frage im Vorstellungsgespräch bei IBM

Two "leetcode style" questions, one algorithms based, one database.