https://ide.codingblocks.com/#/s/13238
bhaiya I’m getting my output for sample input correct ,but wrong answer on submission…!!
https://ide.codingblocks.com/#/s/13238
bhaiya I’m getting my output for sample input correct ,but wrong answer on submission…!!
Hey bud ! , your whole code is fine except one place where you are comparing cnt > k because you have to check if there is atleast k items satisfying the given conditionns or not . So you just need to make equality btw them. You can crosscheck here with my code. https://ide.codingblocks.com/#/s/13247
thank you… It worked.!!