Two implementations of the RePair compression algorithm.
First implementation that uses a doubly linked list to store the input string characters, it iterates through the list to find pairs of characters that are adjacent to each other to compress them into a new character, thus reducing the length of the string.
The same concept as rePair, but now it uses a maxHeap with the doubly linked list to do the RePair