Staburo interview question

They asked me for some formulations in R.