SAP interview question

sorted array longest common prefix