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.
You need to pack each boolean in a single bit (as opposed to the entire byte), which would then fit in ~128 MB. Something like C# BitArray or C++ bitset or specialized vector.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Time Complexity: Primality
You are viewing a single comment's thread. Return to all comments →
You need to pack each boolean in a single bit (as opposed to the entire byte), which would then fit in ~128 MB. Something like C# BitArray or C++ bitset or specialized vector.