Can't seem to solve why not passing the Max of N - seems to work with all the test data Any pointers would be appreciated