First is Madara; he's a polymath who, overall, has more knowledge than anyone in the NV; think of him as da Vinci - a master in a wide-range of fields.
Orochimaru's right there with him, and I'll admit, it's arguable, between Orochimaru and Madara on who is truly smarter, but so far, Madara's first place in my book.
Third is Shikaku; unlike the other two above, he presumably has brain processing power similar to his son, enabling him to learn things at accelerated rates, compared to everyone else, theoretically. He's not pseudo-omniscient like to two above though, only due to the fact that he never dwells into such fields (history, science, etc.); he's more of a strategist, which he easily surpass the two above in.
Fourth is honestly Kabuto. He doesn't even acknowledge that he is a genius, but he's like a downsized Orochimaru, with some unique genius of his own.
Fifth is a toss-up between Minato and Tobirama (yep, no Shika), due to their analytic and creative feats.
Special mention
Shikamaru of course. He has the potential to be third or even second on this list, due to his young age, and his strategical genius is already better than Orochimaru and Madara's. He lacks knowledge in any other categories, though, to compensate for his lack of abilities; the thing is - he's only 17. Give him some time, and he may be the Urahara of the NV, making unique battle equipment (possible engineering prowess) for himself and having a pretty broad understand of NV history, due to being in this war.