Apple Interview Question

Question About diffiy helman algorithm