LG Ad Solutions interview question

DSA question: LCM of 2 strings