The below function works fine when using an integer array(minNumCoins) but does not return anything while using a vector instead of an array. Can anyone tell me why?