The story of Odin hanging from Yggdrasil is very similar to that of Jesus on the cross. Here are the stories broadly:
In order to learn of the runes that are used to control the worlds Odin hangs himself from the great world tree Yggdrasil, and stabs himself with his spear. He forbids the other gods from helping him, and he then hangs there for 9 days, staring into the dark waters below, after which he gains the knowledge he searched for. Doing this was basically him sacrificing himself, a sacrifice that made him worthy to obtain the knowledge he wanted.
Jesus is put on trial by the Romans and sentenced to death. He is put on a cross, on which he claims his father (God) has forsaken him. He dies, which is confirmed by stabbing him with a spear. He descends to hell, but comes back after 3 days, after which he has sacrificed himself (basically to himself in a different person), after which the sins of the world are forgiven.
In both stories, the divine figure is sacrificed by hanging and being stabbed by a spear, are plunged into darkness (hell/the dark waters below) for 3 or 3x3 days, without help from other deities, thereby themselves for the greater good.