Question: Create a function that accepts an array of string as an input and returns Array list of repetitive items. Ex1 : input : [ali, simranjit,
Create a function that accepts an array of string as an input and returns Array list of repetitive items. Ex1 : input : ["ali", "simranjit", "vansh", "ali","tamanna", "simranjit"] -> Output : ["ali", "simranjit"]// ali and simranjit repetead more than once in input but tamanna and vansh was only once Ex2: input : ["david", "alex","robert","David", "susan", "DAVID"] -> output : ["david"]// if one name like david exists more than one but in different shape like "David" or "DAVID" it should be counted and return all small letter ["david"]ex3 : ["Alex", "vansh","joe","Alex"] -> output : ["alex"] // hint in the output array we do not have any capital letter, in case Alex exits 3 times it should be returned in small for like ["alex"]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
