It's not a solution at all. It's a transfer: It gives your problems to other people, and then gives them new problems on top of it.
I used to think that suicide was just the most selfish thing a person can do, because it's all about bringing the end to your own suffering without thinking about how it affects the people you leave behind, and throws away all the potential good you could have done. My view has softened a bit to make room for compassion for those who are suffering from depression or terminal illnesses, but I still think there is no bigger waste than to throw away your precious life. Especially so if you think it'll solve any of your problems.
In Buddhism, all existence is like being stuck in a washing machine with endless rinse cycles: you get beat up over and over again, but you never get to the dryer by yourself; the whole load needs to go together. I now see that suicide isn't just selfish in thinking someone can escape their own problems, but it's also futile because they're just going back into the rinse, to be reborn over and over again to deal with the karma they created by killing themself.
Imagine killing yourself and then realizing that not only did you NOT end your problems and suffering, but you have prolonged it and set yourself back on the path to liberation.