Add solution and tests for isDecreasing