Given the limitations of your knowledge, that is the one that I would choose. It is pretty easy to implement, even though it is rather inefficient towards the end.