Just like King Lear, Shakespeare's Hamlet exists in several versions: the First Quarto version, the Second Quarto version, and the Folio version. The First Quarto version is widely believed to be the play as reconstructed from memory by an actor in Shakespeare's company who performed in the play. The Folio version, even though it was compiled by Shakespeare's buddies after his death, is believed to be the most authoritative.
Let's zoom in on one of Hamlet's famous soliloquies in Act 1. He's raving about a lot of things here, and especially about his mom's marriage to Claudius, a sneaky dude who killed Hamlet's father and took over the throne. We'll look at two versions of the soliloquy: from the First Quarto and the Folio.