Let's say you participated a weekly contest on LeetCode and found that you've solved one of the problems before, or have implemented the complex data structures (e.g. seg tree, BIT, AC-automaton, etc) required to solve the problem. Do you consider it perfectly OK to help yourself with your own old code for this contest? Or do you refrain from doing that for reasons like trying to get more practices for interview-style coding? If so, what about pure competitive programming contests like Codeforces?
PS: I currently refrain from reusing code and using all tools including IDEs / debuggers during leetcode contests since I'm preparing for an upcoming interview. But I'm indeed planning to begin using everything I have once that interview is over.