How to solve this problem from gfg

can u pls sen the code

which question share question link