ik after a long time
POTD: longest common prefix , what i did was to sort the list of the words then compare the last one and the 1st one
store them in their variables and run the loop till the smallest length of the 2 words
the just append the same letters in ans and return