Write a python function called find_duplicates(s) which takes a string, s, that may have repeated characters in it, and
Posted: Fri Apr 29, 2022 6:36 am
Write a python function called find_duplicates(s) which takes a
string, s, that may have repeated characters in it, and returns a
list of all repeated characters in the string. If you created a
string, list, dictionary, and/or set inside your function, what
data structure(s) did you create and why? What is the time
complexity of your solution and why?
Function
Parameters
A string that may contains repeated characters.
Return Value
A list of characters that have duplicates in the input string.
The characters in the list can be in any order.
Example
string, s, that may have repeated characters in it, and returns a
list of all repeated characters in the string. If you created a
string, list, dictionary, and/or set inside your function, what
data structure(s) did you create and why? What is the time
complexity of your solution and why?
Function
Parameters
A string that may contains repeated characters.
Return Value
A list of characters that have duplicates in the input string.
The characters in the list can be in any order.
Example