so bitcoin is very hard to attack in this method. (51%)
but other cryptocurrencies are very vulnurable to such attacks.
so attacker can steal other currencies and then buy with them bitcoins...
how can this problem be solved?
It is not actually that easy to "solve this". Of course that it is posible but then you will have to tweak the codebase which means that some people might not like the idea of changing the POW aka proof of work algorythm which could lead to another fork and you who wanted to change this will get kicked out from the original chain and will create an altcoin as a result. Not all other cryptocurrencies are vulnurable to such attacks, it mainly is the reason behind the algorythm that bitcoin uses and some other as well.