Problems with specific logics!!!!

There are many problems which have very specific logic, so that they get solve in single step.
But if we try to solve such problems via brute force or basic method then we definitely encounter TLE(Time Limit Exceeded).

I am talking about problems like

1)Josephus Problem

2)Coin & Stack Problem

These type of problems are very common in every coding contest.
If you are novice and try to solve and optimize it upto any extent but your solution will not get accepted till you get that specific logic.
This is the problem with every beginners.

My question is that

Where should anyone can learn about such tricky sets of problems?
If you know any such resources/links which help in this regard then please do share else
why not we make a collection of such problems with their mathematical logics here by contributing our own knowledge.

//