The final battle with Doctor Octopus is quite demanding. Escape all attacks performed by enemy, being as agile and mobile as it is possible. If you have been caught by enemy, simply change the character - in this way you will avoid losing studs.
The pattern of the fight isn't complicated: approach to the enemy and wait for the killing blow, then dodge all the hits. Archvillain's tentacle will get stuck, so you can easily break it down (hit an attack button). Repeat this action for three times, finally defeating the "armless" Doctor Octopus.