hi
can someone tell me a standard approach 2 solve number pyramids in cpp.some pyramids r easier but what i hav observed is dat every problem requires a different approach.when we r workin on a same environment den why not hav a std approach??

Member Avatar for iamthwee

presumably you mean http://nrich.maths.org/public/viewer.php?obj_id=2281

It would appear that you are given the bottom row and you need to find what arrangement will yield the greatest total at the apex of the pyramid.

You could probably get away with using a brute force algo such as std::permute, although perhaps a dynamic solution exists.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.