NatWest Group interview question

longest common prefix question in coding leetcode 14