Frage im Vorstellungsgespräch bei Amazon

one is power function implementation another one is about expected value calculation