Back to problems

Possible ABO Parent Genotypes

Algorithm · Upstart · Medium

You are given the ABO blood-type phenotypes for two parents and one child. Determine every combination of parental genotypes that could produce that child's phenotype. The only allowed phenotype values are A, B, AB, and O. Phenotype Possible genotypes A AA, AO B BB, BO AB AB O OO Each parent randomly contributes one of their two alleles to their child. The task is, given parent1Phenotype, parent2Phenotype, and childPhenotype, to produce a list of all valid ordered genotype…

Checking your access…