My code is able to execute some test cases . please tell whether my thinking is wrong or any miskate in code .
I am thinking like to find nesting depth i am counting longest continuous number of 1 's and position as last occurence of 1 in it.
inorder to find The maximum number of symbols between any pair of matched brackets i am counting maximum number of symbols between 1 and 2 along with 1 and 2 and finding first occurence of 1 in it . I am doing this in second for loop .
I handled both cases separately in different loops .
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
Read more… (192 words)