SpaceX interview question

write search algorithm to calculate the totals