Cloudera interview question

Not super hard algorithms questions (Leetcode easy)