So, I have an array containing only 0\'s and 1\'s. I have to find out the largest subarray containing equal number of 0\'s and 1\'s. One can be a naive approach have complex
Hash map implementation in O(n) time.
int count=0, max_length=0; unordered_map mp; mp[0] = -1; for(int i=0; i
Hope this code block helps.