jeudi 14 juillet 2016

Paper Folding asked in competitive exam

you are given a paper when you fold it once from the middle it divides into half and it marks a pattern which will be upward (V like pattern) when you again fold it for second time another pattern is created One downward and 2 upward(Valley Hill Hill) for third fold the pattern will be created (VVHVVHH) and so on.. you have to write logic to find pattern for n folds. Please suggest logic or algorithm to find the solution

Aucun commentaire:

Enregistrer un commentaire