Refactored out tridiagonal-solver.
task2 -> task2a