You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Firstly I will check wether element is first occur or it is occured befor already
Then if it is occured first time then i will stor it in map and change max2 accordingly
else if is occured earlier then i will remove it from map and increase my second pointer and after that i will that element again as my first pointer remians same in this case