Mindset Consulting interview question

They give one coding question

Interview Answer

Anonymous

26 Sept 2021

I write the code but I am not get the output