At L1, Two Weapon fighting (TWF) is more optimized. At level 20 the preference switches to Great Weapon Flighting (GWF).
Let's look at why. We're only going to go with a brief snapshot here of L1 and L20. I'm going to assume that Str is 16 at L1 and 20 at L20. Our TWF will wield dual Scimitars (or short swords), and our GWF will wield the Maul or Great Sword.
We'll use the Ogre from the starter as our jousting dummy at L1 (AC 11) and the Nothic (AC 15) at L20 (the Ogre is a near auto hit and thus relatively uninteresting for this particular comparison). The hit chance for our L1 bout is 75%, and the hit chance for our L20 bout is 80%. When a better study of monsters is available to me, I'll update our hit chances here.
To explain the concepts here the TWF gets to add their stat bonus to their bonus action attack, whereas our GWF gets to reroll any 1s and 2s on their first pass of die rolls. We'll be using the following formula for the average die for the GWF:
Avg(2d6) = 2(2/6 * 3.5 + 4/6 * 4.5 = 25/6) = 8.33
To calculate crits in 5e, you simply multiple the dice rolled by the crit chance. Since nothing is maxed, there is no need to subtract the crit term from the main roll in this edition.
L1 AC 11:
GWF: 2d6 + 3 = 11.33 * .75 + .05*8.33 = 8.914 DPR
TWF: 2*(1d6+ 3) = 2*(6.5*.75 + .05*3.5) = 10.1 DPR
As you can see, at L1, the TWF has an edge of about 1 DPR. Let's look at L20. At L20, our stats go to 20, the fighter makes 4 attacks per round plus the TWF gets his bonus action and the crit range is 18-20 or 15%. Our attack bonus is +11 and our hit chance is 80%
L20 AC 15:
GWF: 4*(2d6+5) = 4*(13.33 * .8 + .15 * 8.33) = 47.65
TWF: 5*(1d6+5) = 5*(8.5 * .8 + .15 * 3.5) = 36.63
At this point the TWF is heavily outclassed by the GWF. It's not even really close. It becomes a bit closer when the hit chance is lower. But, ultimately, the problem is that the TWF only ever gets that single bonus action attack, and it's not going to be enough to compete with the GWF's big single attacks.