Changing data structure to array again. Creating priority queue from array in findSeam methods.