Freyr is Gandalf who is facing the beast. Like Gandalf, Freyr defeats his enemy. .
Different pieces of English literature were also great influences on Tolkien that he used in writing The Lord of the Rings (Piittin). Shakespeare's famous play, Macbeth, influenced the March of the Ents (Day 70). The March of the Ents is when tree-like creatures head to war and attack and overrun Isengard for the injustice done upon them. "The creation of Ents, Tolkien once explained, 'is due, I think, to my bitter disappointment and disgust from schooldays with the shabby use made in Shakespeare of the coming of 'Great Birnam wood to high Dunsinane hill':I longed to devise a setting in which the trees might really go to war"(Day 70). Tolkien improved on the prophecy made by the witches in Macbeth by having the trees march to war rather than have humans disguise themselves as trees. Tolkien also borrows the three witches' prophecy in his story for the Witch King of Angmar, but he also improves it. The prophecy of Macbeth said that nobody born of woman shall harm him. Macduff only slays Macbeth because he tricks him into believing that since he was not born normally, that Macduff could kill him. In The Lord of the Rings, there is a similar prophecy that no man could kill the witch king. Instead of a man, it is a woman, Eowyn who slays him. This is a great improvement to the prophecy that Shakespeare wrote. A writer named William Morris also gave Tolkien inspiration. Morris inspired Tolkien to create an alternative world because he was the first story teller to write a story in an entirely fictional setting(Tolkien's Sources). "Several of Morris's novels have resonances in Tolkien, particularly The House of the Wolfling, based in part upon Norse mythology. The Rohirrim in The Lord of the Rings echo Morris's creation in Wolfings" (Tolkien's Sources).
Lastly, Tolkien's own experiences also influenced his writing significantly.