A ball hits the floor and rebounds after inelastic collision. In this case
Here we consider the ball and earth as one system. Since no external forces act during collision (the gravitational force is an internal force only), the total momentum is conserved.