vendredi 24 juin 2016

framing of a recursive solution

http://ift.tt/28Q8Wm4 I found this practice question on hackerearth. I think this has some recursive solution to it but not able to exactly frame it up.

I could find that there are four possibilities at each step.

  1. both A and B selected

  2. None selected

  3. A selected and B not selected

  4. B selected and A not selected

so plzz could you help in writing a solution to this question

Aucun commentaire:

Enregistrer un commentaire