It really depends on the species. There are many smaller species that top out around 6"-8". Even with their aggression, some larger tougher fish can probably hold out assuming the tank is large enough.
Community choices
With such a highly carnivorous nature you may also believe that snakeheads are not suitable for the community tank but, if heeding a few warnings, some make good community fish.
Consider first the size of species and many dwarf species behave well enough to become community fish. Another concern is the size of tank mates. Obviously, maintaining a school of Neon tetras with snakeheads is too much of a risk, so they should always be kept with fishes too large to be considered food.
For many medium-sized snakeheads in the 30-40cm/12-16” range, tank mates should ideally be relatively fast swimming and robust fish. Many medium-sized to large cyprinids are therefore ideal.
Despite their predatory nature, smaller snakeheads are retiring in nature, so can suffer at the hands of large, aggressive cichlids.