A better approach would be to uninstall 3rd party apps in increments of 5 making note on a piece of paper which 5 you uninstalled. After you've uninstalled 5, see if the advertisement comes back. If so, rinse and repeat. Do this until it's gone. By that time you will have narrowed it down to 5 apps. Should be easy to figure out which app is causing the ad.
Process of elimination is a better solution than factory resetting the phone.. only to reinstall the same apps and be right back where you started.
I think that after reading both of those threads you will have gained the knowledge needed to where you will not be installing 3rd party apps that may cause issues like this again. Like they say, knowledge is power. Indeed, those links will help.