His indecision. Had Hamlet made his vengeful move on Claudius earlier in the play, perhaps he wouldn't have met his tragic end. For example, Hamlet should have killed Claudius when he wasn't prepared or expecting it---when he was praying---instead of waiting to do it later. Hamlet also seems to have a dramatic flair and likes to be the center of attention. Maybe this is what stalled him in getting his revenge--had he just DONE something to avenge his father instead of trying to come up with some magnificent way of doing it, then he might have escaped with his life.
He was so absorbed in his objective to take revenge of Claudius, that he sacrificed his love, Ofelia. In order to achieve his aim, he pretended to be insane. His insane behaviour had an unrepairable effect on Ofelia, who committed suicide. This was his only flaw, all the other actions were reasonable and effective. http://adviserinmathphysics.blogspot.com