We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Think its because the intersection method is mainly for intersecting sets, and sets can have no duplicate entries. Even if you can intersect a set with a list, the resultig set will have no duplicate entries like the list.
The arr list will have duplicate entries, so there will be duplicate matches.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
No Idea!
You are viewing a single comment's thread. Return to all comments →
Think its because the intersection method is mainly for intersecting sets, and sets can have no duplicate entries. Even if you can intersect a set with a list, the resultig set will have no duplicate entries like the list.
The arr list will have duplicate entries, so there will be duplicate matches.