Apple interview question

Question About diffiy helman algorithm