Universal algorithm implementations