Mechanism to check sulphide ion test for bacterial contamination in water


How to check the bacterial contamination of water by testing for sulphide ions? What is the mechanism of action of this test? The query has been assigned to me as part of my chemistry project at school.