.NET Fiddle

CSharp · Console

/Program.cs

using System;
using System.Collections.Generic;
using System.Linq;
					
public class Program
{
	public static void Main()
	{
		int[] blades = { 500, 530, 550, 475, 450, 525, 460, 505 };
		foreach (int blade in SortBlades(blades)) Console.WriteLine(blade);
	}
	
	public static int[] SortBlades(int[] blades)
	{
		blades = blades.OrderByDescending(b => b).ToArray();

		int[] result = new int[blades.Length];
		if (result.Length == 0) return new int[0];
		result[0] = blades[0];
		
		for (int i = 1; i < blades.Length - 1; i++)
		{
			// get the longest empty sequence and put the current blade to its middle index
			var sequences = new List<Sequence>();
			int tmpStartIndex = 0, tmpEndIndex = 0;
			
			for (int j = 1; j < result.Length; j++)
			{
				if (result[j] == 0 && result[j-1] != 0) tmpStartIndex = j;
				if (result[j] != 0 && result[j-1] == 0) tmpEndIndex = j - 1;
				else if (result[j] == 0 && j == result.Length - 1) tmpEndIndex = j;
				else tmpEndIndex = 0;
				
				if (tmpEndIndex != 0) sequences.Add(new Sequence() { StartIndex = tmpStartIndex, EndIndex = tmpEndIndex });
			}
			
			foreach (var sequence in sequences) sequence.SumOfWeightsAround = result[sequence.StartIndex - 1] + (sequence.EndIndex == result.Length - 1 ? result[0] : result[sequence.EndIndex + 1]);
			
			// for more longest sequences take the one with minimum surrounding blades weights
			result[sequences.OrderByDescending(s => s.EndIndex - s.StartIndex).ThenBy(s => s.SumOfWeightsAround).Select(s => (s.StartIndex + s.EndIndex) / 2).First()] = blades[i];
		}

		// the computation is not needed for the last blade
		result[result.Select((v, i) => new { Index = i, Value = v }).Where(e => e.Value == 0).Select(e => e.Index).First()] = blades[blades.Length - 1];
		
		return result;
	}
}

public class Sequence
{
	public int StartIndex { get; set; }
	public int EndIndex { get; set; }
	public int SumOfWeightsAround { get; set; }
}
;