Tweets per second calculator (Talent Buddy)
Naming

Your FindMaxLastK method doesn't describe it's intention very well, what is tps and k when viewed at a glance?. What you have is a windowing function finding the max within that window. Name your function after that: 

static int MaxInWindow(int[] values, int start, int trailingWindowSize)




The conditional expression in your max function could be clearer if you used Math.Max(int, int)



My implementation would look like:

public static int MaxInWindow(int[] values, int start, int trailingWindowSize)
{
    //TODO Validate arguments
    var lowerBound = Math.Max(start - trailingWindowSize, -1);
    var max = values[start];
    for (int index = start - 1; index &gt; lowerBound; index--)
    {
        max = Math.Max(max, values[index]);
    }
    return max;
}


Performance

Your solution is O(m * n) where m is the number of seconds and n is the window size. I just saw the answer in a related question and the optimal solution is O(m).

The solution uses a LinkedList to keep track of the max in the window. Here is my implementation in C#:

public static IEnumerable&lt;T&gt; MaxInSlidingWindow&lt;T&gt;(T[] values, int windowSize)
{
    var comparer = Comparer&lt;T&gt;.Default;
    var window = new LinkedList&lt;Tuple&lt;T, int&gt;&gt;();// Max at position and position

    var length = values.Length;
    for (var index = 0; index &lt; length; index++)
    {
        var value = values[index];
        while (window.Count != 0 &amp;&amp; comparer.Compare(window.Last.Value.Item1, value) &lt; 0)
        {
            window.RemoveLast();
        }

        window.AddLast(Tuple.Create(value, index));

        while (window.First.Value.Item2 &lt;= index - windowSize)
        {
            window.RemoveFirst();
        }

        yield return window.First.Value.Item1;
    }
}