In general, violence can certainly solve problems, especially when the problems are not being caused by almost-inevitable technological revolutions. One of the issues to keep in mind, though, is that it often also creates new ones, often surprising ones. For example, the assassination that led to World War One. For another example, if Trump had been assassinated last year, that would have solved many problems for people who dislike Trump. However, that doesn't necessarily mean it would have made the world overall a better place - that is almost impossible to predict. Hence the sci-fi sort of scenario of "you go back in time and kill Hitler, but when you return to your own time it turns out that Hitler dying just let mega-Hitler take power".