Added inverse functionality to find missing term in ascending set