Contributing to forums this will help you to analyze what problems others are facing and you may also give a solution to it. Hence when next time you face the same problem you don't have to worry about putting your brain on it again.
Solving mathematical problems
Yes it will improve is logical thinking a lot and it's important to be logical in this field.