Brute force

  • Use an offset starting from 0.
  • set offset = offset + 1 if all strings have same char at offset.
  • loop until offset exceed any string's length or chars at offset are not the same.