Company: Meesho_17july
Difficulty: medium
Maximum profit Problem Description You are given two binary strings, S and Q, each of length N and made only of the characters '0' and '1'. Pick any non-empty substring S1 from S and any non-empty substring Q1 from Q having the same length. Let X denote the string produced by XOR-ing S1 with Q1, position by position. The Profit function is defined as: Profit = floor(len(X) / 2^k) where X_B is the decimal value of binary representation of X and len(X) is the length of string X. Notes A substring is a contiguous sequence of characters within a string. For example the list of all non-empty substrings of the string "apple" would be "apple", "appl", "app", "ap", "a", "pple", "ppl", "pp", "p", "ple", "pl", "l", "e". Exclusive-or compares two input bits and generates one output bit. If the bits are the same, the result is 0. If the bits are different, the result is 1. In the string X, the leftmost character is treated as the MSB (Most Significant Bit) and the rightmost character is treated as