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.
Just to make it clear. Did I understand right, that we first need to convert strings(elements of list, for example) of type string to integer type and then bin(i | j).count('1') will compare that integers bit by bit like they were in binary format, so we actually get how many '1' one(i) or another(j) integer has in 'uniq' bit position?
I hope that you can understand what I just said :D
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
ACM ICPC Team
You are viewing a single comment's thread. Return to all comments →
Thanks for reply!
Just to make it clear. Did I understand right, that we first need to convert strings(elements of list, for example) of type string to integer type and then bin(i | j).count('1') will compare that integers bit by bit like they were in binary format, so we actually get how many '1' one(i) or another(j) integer has in 'uniq' bit position?
I hope that you can understand what I just said :D