Practicing my algorithms