I conducted an interview with leetcode 2 years ago while not doing any leetcoding before. Surprisingly, by just applying some math tricks i finished them and got into later rounds. So yes math tricks are helpful.