Feature #9: Kth Missing Gene

Implement the "Kth Missing Gene" feature for our "Computational Biology" project.

Description

A planet has n genes, numbered 1 to n. Every species on the planet has a subset of these genes in its DNA sequence. For a given species’ DNA, A, we want to find the kthk^{th} missing gene in a sorted order. The given DNA sequence will be sorted in strictly increasing order.

The following examples may clarify this problem:

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.