Fix a function that should return the middle list element. In case of list having even number of elements the left middle element should be returned, e.g. [1,2,3,4]
should return 2
Include algorithm explanation
Test discovered that each scenario returns element on index higher by one ex. expected should be Some(2)
and actual is Some(3)
- First step: preparing tests
- Second step: tests interpretation
- Not able to deliver solution