Given a list of strings in any convenient format display the amount of comparisons between individual characters that a merge sort algorithm would perform.
The merge-sort algorithm is a divide & conquer method for sorting lists. It divides the unsorted list into n sublists, each containing one element (a list of one element is considered sorted). We repeatedly merge sublists to produce new sorted sublists until there is only one sublist remaining. This will be the sorted list.
The merging process compares elements from the array on the left to elements from the array on the right in order, filling in the resulting array.
In particular, we will use it with a comparator that naively scans the strings for the first difference and returns a value in range [-1, 0, 1].
The reference implementation to validate yours against: Try it online!
Some test cases:
['banana','anana','nana','ana','na','a'] => 18
['aaaa','aaab','aaac','aaad'] => 16
['aaad','aaab','aaac','aaaa'] => 20
['mor','tor','rot','tor','rotor'] => 13
Shortest code wins.