Just curious if this is a known issue or not, but I have been noticing many instances where legit solutions in C++ are failing due to timeouts. The only way to get them to pass is oftentimes micro optimization (i.e. changing from vector of 2 ints to a pair of int, eliminating helper methods, iteration over recursion). These micro optimizations are likely compiler dependant, perhaps machine dependant, reinforcing bad practices.
Perhaps you guys should have a baseline set of solutions in each language for all problems done both iteratively and recursively and run them nightly, especially for new problems. The people paid to write the problems could be responsible for writing these or you could offer solution bounties for a few days of subscription or something to get these solutions. This way if you notice some starting to fail in certain languages the aggressive test cases could be pruned back automatically.
People should not be doing this kind of optimization, they should be focusing on the algorithms. Leetcode is only as good as the quality of its questions and test-cases.