biggest and secondBiggest to the minimum possible integer value.smallest and secondSmallest to the maximum possible integer value.num in nums.
num is greater than biggest, update secondBiggest to biggest and biggest to num.num is greater than secondBiggest, update secondBiggest to num.num is less than smallest, update secondSmallest to smallest and smallest to num.num is less than secondSmallest, update secondSmallest to num.biggest and secondBiggest minus the product of smallest and secondSmallest.