Prefix Set

https://codility.com/demo/take-sample-test/prefix_set