Consensus/ranked ordering algorithm Say I have a set of numbers, for example {1, 2, 3, 4, 5}. Is there an algorithm that allows these numbers to be put into a consensus ordering based on a ranked vote? For example, if 3 people vote and their votes are [1, 2, 3, 4, 5], [2, 1, 3, 4, 5], and [1, 2, 3, 5, 4], then the consensus ordering would be [1, 2, 3, 4, 5]. Ideally the algorithm would support votes of partial orderings as well, such as [2, 5, 4].

I'm pretty sure I can extend the ranked voting system to produce a complete ordering of the "candidates," but I'm wondering if there's already an algorithm to do this.
I have both good news, and bad news.  Not only is there a way to do it; there are many candidate ways to do it.  For instance, you could use IRV, Condorcet voting, Borda count, or many other schemes.  See https://en.wikipedia.org/wiki/Ranked_voting and https://en.wikipedia.org/wiki/Social_choice_theory.

Unfortunately, there are also negative results showing that no scheme provides all of the properties that we might desire.   See Arrow's theorem: https://en.wikipedia.org/wiki/Arrow%27s_impossibility_theorem and https://en.wikipedia.org/wiki/Condorcet_paradox.