Nationalism and imperialism

To what extent did nationalism and imperialism reflect the assumption that nineteenth century European societies were engaged in a struggle for existence among themselves?
engage with both nationalism and imperialism, as well as draw on ideas by J.G. von Herder, Charles Darwin, and J. Hobson