Short algorithm examples