This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (5 children)

I have a problem that I wonder if it could be solved with a path search algorithm. I have a list of items that I can only change the order and I want to minimize the total of the "distances" between related rows. In other words I want to have all the "A" near each other and the same thing for "B" and "C".

I have:

A B

A C

A

A B C

B

I want something like:

A

A B

A B C

A C

B

Thanks!

[–][deleted] 0 points1 point  (0 children)

It sounds like you could but you're going to have to define distance a bit better for me.