When buying timber flooring, make sure you ask for stock that is 'conditioned' to the weather - best to ask for flooring that has been in the warehouse for over 12 months. This way, the timber is conditioned and will not expand/contract as much after installation.
Also depends on the expertise of the installer - the good ones will make it so that the gap between the flooring is just enough for it to expand/contract.
Thirdly, also depends on the material. hardwood timber tends to be more stable than softwood.