Feature #9: Kth Missing Gene
Implement the "Kth Missing Gene" feature for our "Computational Biology" project.
We'll cover the following
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, gene_A
, we want to find the missing gene in a sorted order. The given DNA sequence will be sorted in strictly increasing order.
Constraints
1 <= gene_A[i] <= 1000
1<= k <= 1000
gene_A[i] <= gene_A[j] for 1 <= i < j <= gene_A.length
The following examples may clarify this problem:
Level up your interview prep. Join Educative to access 80+ hands-on prep courses.