Fails test case 3 and I can't seem to find the reason. Have submitted the same code in gfg and leetcode where it got accepted

@Arpan_Goswami if v.size()==0 print 0

Ohh didn’t notice thanks