My code may not be the best. But as best as I can test, it's correctly calculating the longest sequence. So I don't know why it's failing to pass the last requirement. I would gladly appreciate any assistance as to why it's not working out.