improve lc longest common prefix