29. During the Aseres Yemei Teshuvoh, we say “Hamelech Hakodosh” (שו”ע סי' תקפ"ב ס"א ) since these are the days when Hashem sits and judges the whole world, showing His kingship and sovereignty (מ"ב סק"ב ).
30. If one erred or is unsure if he said Hamelech Hakodosh, he must start Shemoneh Esrei over (שו"ע שם ) since the first three brochos are like one big brochoh (מ"ב סק"ד ).
31. Unsure on Rosh Hashonoh. If one is davening on Rosh Hashonoh or Yom Kipur and knows that he said “Uvechein tein pachdecho...” but is not sure if he finished with Hamelech Hakodosh, it could be that he does not need to start over. Perhaps we say that since he said all the additions before the end of the brochoh, we do not assume he finished the way he does all year (מ"ב סק"ד ). Thus, due to sofeik brochos, he should not start again (האלף המגן סקי"ט בהג"ה ); all the more so if he is unfamiliar with the nusach and is davening from a siddur since it is very possible he finished properly (הגריש"א, הליכות והנהגות עמ' ז' ).
32. Toch kedei dibur. If one said Hokeil Hakodosh but immediately corrected himself and said Hamelech Hakodosh within toch kedei dibur, i.e., he did not pause for the amount of time it takes to say three words between finishing Hokeil Hakodosh and saying Hamelech Hakodosh, he does not need to restart (שו"ע ומ"ב שם ). If he paused for longer than that or already said even one word from the next brochoh, he must start again (מ"ב סק"ז ).