Haskell, 98 71 bytes
h.r h(x:s)|(a,b)<-span(/=x)s=l b:l s:h(b++r a) h e=e r=reverse l=length ###Explanation
Explanation
For a list of length n this method produces 2*n flops. It works by looking at the last element of the list, looking for the same element in the list before and flipping it to the second to last position. Then the list with the last element removed is recursively "neighboured".
For the list [1,2,3,1,2] the algorithm works like this:
[1,2,3,1,2] flip longest prefix that ends in 2: flop 2 [2,1,3,1,2] bring first element to second to last position: flop n-1 = flop 4 [1,3,1,2,2] recursively work on n-1 list [1,3,1,2] there is no other 2: flop 0 [1,3,1,2] flop n-1 = flop 3 [1,3,1,2] recurse [1,3,1] flop 1 [1,3,1] flop 2 [3,1,1] recurse [3,1] flop 0 [3,1] flop 1 ... All together this yields the flops [2,4,0,3,1,2,0,1,0,0] and the neighboured list [3,1,1,2,2].