I have been doing Codeforces close to a year now and there are many times in practice and real contests I dont even understand the logic of a problem (even in div2B div2C) but through guessing and observing the given test cases, I still manage to solve the problem despite understanding the logic. Do you guys think this is a valid way to solve a problem (even in practice) or should I devote on understanding it deeply. Thanks for reading !
That's more than 60% of my code, but I think the answer is no.
For a contest that might work but in general you would like to understand the problem else you practically didn't solve it.
I would say that you are building intuition, rather than deep thinking. You'll need that for later problems, better practice now.