A strong salt solution is denser than fresh water (i.e. density of strong salt solution is more than that of fresh water), hence it will exert more upthrust on the egg that balances the weight of the egg. Therefore, the egg floats in strong salt solution and sinks in fresh water.