Solution sample

Sample solution from stackoverflow