Ground state of trapped interacting Bose-Einstein condensates by an explicit imaginary-time algorithm