Task 2
Write a function solution that, given a string S consisting of N lowereare letters returns a string that only has letters that occur once in the orisingl string, in the order that they appear on the original string.
Examples:
Given S= "codility", the function should return "codity".
Given S= "background" the function should retum "background.
Given S = "marmalade" the function should return "flde".
Given S= "peep" the function should return "(blank string).
Write an efficient algorithm for the following assumptions:
N is an integer within the range [1..300,000];
string S is made only of lowercase letters