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.
Can you please explain this code?
r2 and r3 are basically empty objects for a Counter class. Okay. Got it.
We are then iterating through arr. Okay .
But,
What is (if v in r3) mean? r3 does not have anything right? It is just an object !
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Count Triplets
You are viewing a single comment's thread. Return to all comments →
Can you please explain this code? r2 and r3 are basically empty objects for a Counter class. Okay. Got it. We are then iterating through arr. Okay . But, What is (if v in r3) mean? r3 does not have anything right? It is just an object !