Find maximum length sub-array having equal number of 0s and 1s.
Greedy method of solving problems involves a predefined procedure to follow to obtain the result.
Consider first element of the array as sorted then loop through remaining elements and perform insertion like inserting an element is done in a sorted array.
BeginnerAnother beginner problem on CodeChef based on concept of Binary Search Tree. If you are familiar with...