//Solution 1: Using Array Frequency Method
class Solution {
public:
int lengthOfLongestSubstring(string s) {
if(s.find_first_not_of(' ') != string::npos){
// There's a non-space && visit array ~ 127 ascii chars.
int visit[150];
memset(visit,0,sizeof(visit));
int mx=0,x=0;
for(int i=0;i