if you get the opportunity, I recommend reading Harlan Ellison's book - if nothing else but to get to read the original teleplay.
It's pretty eye-opening to read Ellison's book, and realize that in his original draft Kirk acts to save Edith, and everything turns out right only due to Spock's intervention. Ellison is pretty even-handed in his book, saying that he likes his version but "Trek fans swear by the version that aired, see what you think." (Pretty even-handed for Ellison, I mean.)
The ending in the Trek episode is so obviously better than Ellison's version, I'm surprised a professional like him could hold a different opinion. Of course the hero needs to resolve the problem himself: that's what it means to be a hero.