Micron Technology Interview Question

leetcode question on probability and arrangement.