Micro Focus interview question

Recent interesting problem I solved