Proactive monitoring is vital to a highly-available environment. We have a quick start guide on Experts Exchange for Grafana users.
Become a Premium Member and unlock a new, free course in leading technologies each month.
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
there is no "index array" these items physically must be picked up and moved.the methods using an index array means that you do the sorting in two phases: a sorting phase where you only find out the new positions of each item, and then a second moving phase.
7) Can one person (or machine) carry more than one piece at a time, or can he gather, say, 10 pieces that belong to one owner and move them to their final destination?From these answers and all the others, I think we consider all items to have the same weight, and "work" can be defined as the total distance traveled by the one person moving the items from the array to the containers, where each container is associated with one of the owners. But one point is not clear to me.
-- for the purposes of this exersise, i am trying to determine "work" of an algorithm
8b) If weight is not a factor, then are you trying to minimize the total distance a person (or machine) travels to complete the sort?
-- i think the answer is yes
The travelling salesman problem (TSP) asks the following question: "Given a list of cities and the distances between each pair of cities, what is the shortest possible route that visits each city exactly once and returns to the origin city?"There are some nice animations in the above link to further your understanding.
https://en.wikipedia.org/wiki/Travelling_salesman_problem
then are you trying to minimize the total distance a person (or machine) travels to complete the sort?don't think that is true. it is not the total travel distance but the total transport distances. if only one piece can be transported at a time, the total transport distance is constant for a given Distribution granted we know the final position of each piece.
But, going back to your original statement in the OP:
we all can agree that in a pure sorting methodology, the good old quick sort is likely best.
this assumes a 0 cost for actually moving the element from one sorting position to another.
my question is... what sorting algorithm would be best if there was a cost associated with actually moving the item to its new sorting positon.
If you are experiencing a similar issue, please ask a related question
Join the community of 500,000 technology professionals and ask your questions.