That was the story that I heard on the Terry Gross interview. Actually, I think it was an interview with Sheldon Harnick. He said not only did she sing it the night of the day she was given the song, but she added the high note because it conveyed her giddy excited feeling. It was an example of what made Cook great.
I also think one of her extraordinary gifts was that her speaking and singing voice were the same. She didn’t suddenly switch into a “soprano” voice. Seth Rudetsky comments on it in one of his deconstructions.