I am getting WA in first test case
My code: https://ide.codingblocks.com/s/147614
Hashing problem- Unlock
the question mentions “exactly k swaps”. Also in constraint k is greater than n which means there can be case where k can be greater. But when I removed the k>0 part I got correct answer. Why?
if u already get the biggest combo then no swap needed so exactly k swap should be upto k if u get the biggest combo then just simplly cout the ans
Then it should be max k swaps not exactly k swaps.
yup u got it right max k swap