Standard algorithm implementations