IBM interview question

it was a hackerank, sql, python