Muhyiddin emerges as prime minister after in-fighting between parties in the ruling coalition triggered its collapse.