What ended WW2?

Hitler commit suicide and Germany surrendered. It officially ended when an atomic bomb was landed in Japan.