Unthinkable interview question

Interview- Bubble sort, basic puzzle from gfg