then why don't you find 22 then after that -1 if the number before it is 22 then decrement it again untill the number is not 22 then you have there is your first 22
Ancient Dragon commented: Good solution. +26
NicAx64 commented: realloc good point +1
jephthah commented: good job keeping at it. +11