Honey Interview Question

Time complexity, database questions