I am trying to port some code from Python to C#.
The goal is to compare adjacent elements and see if four consecutive values are bigger than one another.
Following this post (Compare two adjacent elements in same list) I was able to use pairwise on a deque to succesfully compare adjacent elements.
//In python
from more_itertools import pairwise
for x, y in pairwise(a_deque):
    if (x < y):
        i += 1
        if (i == 4)
            print("Hello world!")
The problem is that C# does not contain the more_itertools library so I am currently looking for a similar technique to achieve the same solution.
FYI. The deque implementation is from https://www.nuget.org/packages/Nito.Collections.Deque/
Any suggestions?
 
     
     
     
    