There are almost endless possibilities for alternate endings to Hamlet. I want to encourage you to use this answer to spark your own imagination as, undoubtedly, your teacher is looking to see your creativity and originality.
If you are allowed to take "Hamlet" out of the tragedygenre, then you could allow more of the characters to live at the end. Perhaps, in this scenario, somehow the truth could be revealed without so much loss of life.
For example, I always regret that it takes the moment when Hamlet and Laertes are both about to die that they finally make up and forgive one another. Perhaps another ending could bring these two together far before this moment, and allow them to work together to bring down Claudius. All along the two are so much alike, it seems that if they weren't enemies, they might have made very good friends.
Whatever ending you come up with, be creative and have fun with it. Good luck.