Cerence AI Interview Question

code katta task. we have to write a program in 3 different way. first two are mandatory. 3rd way is optional. write a program in below 3 ways keeping this in mind: 1 . readability 2. performance 3. execution