Both of them are interconnected as link building helps to improve SEO stats. Both are very important, and they both take time. But understanding SEO and Link building isn't rocket science or excessively complex. It just takes a lot of time to learn and implement techniques.
For example link building wouldn't matter too much, if your SEO and keyword density was poorly set up.