Source I mean how greedy approach using recursion worked in this problem. Because lets say if for a particular value more than one pegs accept that value, than choosing the first one would give the best result how it can happen i mean, if we choose the later peg than it may happen that more balls can be put into, some solutions have greedy approach accepted,Please guide over here!! Uva 10276.