[C++] Sliding window O(n) & Prefix sum O(nlogn) implementations
Observation\nSince we need to find the maximum substring that can be replaced we can actually breakdown this problem to an array of integers that represent the 
**Observation**\nSince we need to find the maximum substring that can be replaced we can actually breakdown this problem to an array of integers that represent the replacement cost of `s[i]` to `t[i]` and then find the maximum length of continuous integers in that array whose `sum <= maxCost`.\neg:\n`s = "aabcd"`\n`t =  "zbdag"`\nThe array to find the maximum length on comes out to` [1,1,2,2,3]`.\n\nThis problem can now be solved in many ways, two of which are descibed below.\nSomewhat similar to `209. Minimum Size Subarray Sum`\n\n**Sliding window solution**\nIn general a sliding window is when we keep increasing the size of the window by increasing the right end to fit our goal, if it increases the goal we reduce the window by  sliding the left end until it again fits the goal, this ensures that the maximum window size is attained.\n```c++\nclass Solution {\npublic:\n    int equalSubstring(string s, string t, int maxCost) \n    {\n        int start=0,end=0,sum=0;\n        while(end<s.length())\n        {\n            sum+=abs(s[end]-t[end++]);\n            if(sum>maxCost)\n                sum-=abs(s[start]-t[start++]);\n        }\n        return end-start;\n    }\n};\n```\n\n**Complexity**\nTime: O(n). Since each element is added and removed once at max.\nSpace: O(1). Since we get the elemets of sum array on the fly.\n\n**Prefix sum slolution**\nHere we create an array of prefix sums that hold the sum of differences from `0` to `i`.\nAt every iteration of `i` we can find the continuous sum of `numbers <= maxCost` by binary searching the lowerbound of `prefixSum[i] - maxCost`.\n```\nclass Solution {\npublic:\n    int equalSubstring(string s, string t, int maxCost) \n    {\n        vector<int> prefixDiffSum(s.length()+1,0);\n        int Max=0;\n        for(int i=1;i<s.length()+1;i++)\n        {\n            prefixDiffSum[i]=prefixDiffSum[i-1]+abs(s[i-1]-t[i-1]);   //Stores sum of differences from begining till i.\n            Max=max(Max,i-(int)(lower_bound(prefixDiffSum.begin(),prefixDiffSum.begin()+i+1,prefixDiffSum[i]-maxCost)-prefixDiffSum.begin()));         //Binary search to find start of the window that holds sum<=maxCost and ends with i.\n        }\n        return Max;\n    }\n};\n```\n**Complexity**\nTime: O(nlogn). \nSpace: O(n). Storing prefix sums.
[]