Simple algorithms examples using iOS SDK