Obviously they are linked - the question is where do you start your thinking.

Do you start with the logical task first and structure the data second, or do you actually think about the data structures first?

Let's say I have a optimisation problem - I have a simple scoring function - and I just want to find the solution with the best score. Starting with the logic.

for all solutions, score, keep if max.

Simple eh? Problem is it's a combinatorial solution space. The key to solving this before the entropic death of the universe is to think about the structure of the solution space.