K-th Greatest Element for Each Prefix

Company: Gameskraft_17_dec

Difficulty: medium