DOUBT IN-"Beautiful Vertices"

I am not able to understand where I am going wrong in my approach
link to my code is-https://ide.codingblocks.com/s/60369
thx in advance sir/ma’am.

Pls check your line no. 6 of code

Hi Nikhil, since you have not been responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.