re order list like in netflix
<p>I need an algorithm to reorder a list.</p>

<p>Below are the list and use cases</p>

<pre><code>Code:
    class Items
    {
    public string Name { get; set; }
    public int index { get; set; }
    }


List&lt;Items&gt; temp = new List&lt;Items&gt;();
temp.Add(new Items() { index = 1, Name = "manchester" });
temp.Add(new Items() { index = 2, Name = "Delhi" });
temp.Add(new Items() { index = 3, Name = "madrid" });
temp.Add(new Items() { index = 4, Name = "London" });
temp.Add(new Items() { index = 5, Name = "Ajax" });
</code></pre>

<p>use case :</p>

<p>user comes and manually reorders(index value) the above list </p>

<pre><code>List&lt;Items&gt; newOrder = new List&lt;Items&gt;();
newOrder.Add(new Items() { index = 1, Name = "manchester" });
newOrder.Add(new Items() { index = 1, Name = "Delhi" });
newOrder.Add(new Items() { index = 5, Name = "madrid" });
newOrder.Add(new Items() { index = 3, Name = "London" });
newOrder.Add(new Items() { index = 2, Name = "Ajax" });
</code></pre>

<p><strong>Expected Output</strong> after processing should be</p>

<pre><code>   List&lt;Items&gt; newOrder = new List&lt;Items&gt;();
            newOrder.Add(new Items() { index = 1, Name = "Delhi" });
            newOrder.Add(new Items() { index = 1, Name = "Ajax" });
            newOrder.Add(new Items() { index = 5, Name = "London" });
            newOrder.Add(new Items() { index = 3, Name = "manchester" });
            newOrder.Add(new Items() { index = 2, Name = "madrid" });
</code></pre>

<p>Please advice an algorithm that produces output as in "Expected output section"</p>
