Leetcode is effectively the opposite, because each one is usually a CS paper by itself, which by definition took a very hard problem a long time for a very smart person to create and test the solution.
You cannot practically invent the a leetcode solution from whole cloth if you treat it like an IQ test question should be done. It's a sport and you get good at sports via drills until it become muscle memory.