Append Frequency
Start Timer
0:00:00
Given a string sentence
, return the same string with an addendum after each character of the number of occurrences a character appeared in the sentence
.
Note: don’t treat the spaces " "
as characters. Also; do not return the addendum for those characters that also appear in the discard_list
.
Example:
Input:
sentence = "Interview Query"
discard_list = ['I','e']
Output:
inject_frequency(sentence, discard_list) -> "In1t1er2v1i1ew1 Q1u1er2y1"
Recommended questions for you
Personalized based on your user activity, skill level, and preferences.
.
.
.
.
.
.
.
.
.
Comments