A Reconfiguration Algorithm for Memory Arrays Containing Faulty Spares