Find valid range of q for outcome probabilities | Imc Interview Question