Write a python function called find_duplicates(s) which takes a string, s, that may have repeated characters in it, and

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899604
Joined: Mon Aug 02, 2021 8:13 am

Write a python function called find_duplicates(s) which takes a string, s, that may have repeated characters in it, and

Post by answerhappygod »

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
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply