Question: 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
Task
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 "codility", the function should return "codity".
Given "background" the function should retum "background.
Given S "marmalade" the function should return "flde".
Given "peep" the function should return blank string
Write an efficient algorithm for the following assumptions:
N is an integer within the range ;
string S is made only of lowercase letters
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
