The last two are problematic because you are essentially calling a for loop in a for loop which heavily increases how long the algorithms are going to take.
Using a set to remove duplicates is a great to solve this problem.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The last two are problematic because you are essentially calling a for loop in a for loop which heavily increases how long the algorithms are going to take.
Using a set to remove duplicates is a great to solve this problem.