PROBLEM LINK:Author and Editorialist: Shubham Chauhan DIFFICULTY:Medium PREREQUISITES:Modulo Arithmetic , Tree EXPLANATION:Problem Naturally can be transformed to a more formal way : How many vertices will a trie contain if we add all possible strings with length 2 * N with equal number of zeroes and ones to it. So first of all, it is obvious that upper half of this tree would be a full binary tree. Lets take a look on N = 3: level (0  1) vertex, level (1  2) vertices , level (2  4) vertices, level (3  8) vertices. Starting from Nth level not every vertex will duplicate: only those that haven’t spent their 0’s or 1’s will.
SOLUTIONS:To be Update Soon
This question is marked "community wiki".
asked 16 Oct '15, 21:58
