NatWest Group Interview Question

longest common prefix question in coding leetcode 14