You are given an array of strings words. For each index i in the range [0, words.length - 1], perform the following steps:
Remove the element at index i from the words array.
Compute the length of the longest common prefix among all adjacent pairs in the modified array.
Return an array answer, where answer[i] is the length of the longest common prefix between the adjacent pairs after removing the element at index i. If no adjacent pairs remain or if none share a common prefix, then answer[i] should be 0.
A prefix of a string is a substring that starts from the beginning of the string and extends to any point within it.