Longest Collatz sequence in Scala
There are a few things you could do to make what you've got a bit faster:


The numbers get quite big but BigInt is overkill (and slow). The longestCollatzSeqHelper() method will have to deal with values in the Long domain, but the problem set, and results, are well within the Int range, which will be faster.
Because of the large numbers, you're cache could grow immensely. Perhaps beyond system resources.
You're testing n as many as 4 times per iteration. That can be reduced to 2.


But this is mere window dressing. When you encounter HackerRank timeout limits, code optimization usually doesn't get you very far. 9 times out of 10 you need to go back, re-examine the problem statement, and rethink your approach to it.

When I tackled this problem I started by caching calculations, but eventually I gave that up and started focusing on the other end:


To find the longest Collatz length for numbers &lt;= N, I don't have to count the Collatz length for every number below N. There's a threshold below which it is impossible for the C-length to surpass the lengths for numbers above that threshold.
Some numbers don't need to have their Collatz length calculated at all. Due to a simple mathematical property it is impossible for its C-length to surpass its neighbors.


With this in mind, and caching for reuse only individual results within a problem set, you should be able to pass this challenge.