How to find duplicate word in string?

Certified Associate Developer

Write a code to find the duplicate words in a string.

input string = "Big black bug bit a big black dog on his big black nose"

output: 

Duplicate words in a given string :
big
black

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data