Algorithm test