How can I compare Hamlet in William Shakespeare’s play Hamlet with Oedipus in Sophocles’ Oedipus Rex in terms of how they decide to act in the world?

How can I compare Hamlet in William Shakespeare’s play Hamlet with Oedipus in Sophocles’ Oedipus Rex in terms of how they decide to act in the world?