Dear sir/ma'am
First T = 0, Second T=0 , Thrid T =0
if (X . totalBillAmount>=First T){
Thrid T= Second T
Second T = First T
First T = X.totalBillAmount
}
Now if any card has same number suppose 95 which is First T and after few cards we find another card having 95 then FIrst T is 95
and Second T= 95 I think this is wrong