Problems
Contest
Discuss
Interview
Online Interview
Assessment
Store
Redeem
Premium
For you
For you
Create
Most Votes
All Time
Newest
No search result
Create
Innovaccer | OA | SDE Intern | 2021
Anonymous User
958
Innovaccer
Online Assessment
Algorithm
Data Structure
Interview
No. Test Cases
42
4 5
02_20
21212
121
2
3 3
1
101
1
2 3
1_2
0
1 2
0_
3 4
2220
2___
2222
3 3
012
122
221
3 5
10_01
1_1_1
10_01
1 1
_
2 2
00
00
1 5
01212
5 5
2_222
2_2_2
2_0_2
2_2_2
222_2
1 2
22
1 3
___ (3 Underscore)
2 5
2
1_1__
4 1
1
_
2
0
5 5
0_222
2_2_2
2_2_2
2_2_2
222_2
6 8
11111112
11000012
110__112
110__112
11000012
11111112
4 4
0111
1111
1111
1111
5 5
01222
12222
22222
22221
22211
4 5
1___1
11111
0111_
10010
5 5
0_222
2_2_2
2_2_2
2_2_2
222_2
5 5
0_212
1_1_1
2_2_2
1_1_1
212_2
6 8
11111112
11000012
11022112
11022112
11000012
11111112
5 5
2_222
2_2_2
2_0_2
2_2_2
222_2
5 5
2_212
1_1__
21012
__1_1
212_2
4 5
2212_
1_102
020
10_21
3 4
22_2
10_1
2022
3 3
012
122
221
4 4
2022
2202
0202
2002
4 6
01_111
11_111
11_111
___110
6 7
_11_111
1_111_1
1__1111
1101__1
1011111
0111__1
5 8
22220202
10121222
22200112
02122202
21100220
7 8
_2_1_2_0
221222_1
_2___121
2221_111
2221__22
2121___2
1__11212
7 9
1_111_1_1
1_1_1111_
101111__1
10_01_1_0
_1_11_111
_111011_1
010111_1_
6 10
2222222222
2222222222
2222222222
2222222222
2222222222
2222222220
9 12
112221_11__2
1221_2112222
1_211221111_
0_11221_2221
12121101221_
_221_1211122
1112_1221222
111221222211
2222_2121112
11 13
222_111122222
2121212111122
1121121221222
2112122122122
2112222111212
1122112222012
211221211_221
12_212_1211_2
21122111111_2
1221121_21112
2210221_12122
8 14
2_2__21_211201
122222_2122211
22__2221212122
21_21211111222
221221_1211112
212111111_2122
12121222111121
2_222112221212
3 15
111_111111_1111
0_111_111111_11
11111111111_111
1 16
1120122222212122
15 17
22___222220202222
2_22_22_222022222
2222_222_22222222
222__222222_22222
22__222_2_2222222
2__2_22_22__2__22
2222_2222_2_22222
22_2_022220222222
2__22_02222__2222
2_222_22220___222
22222222222222_22
222_2222022_22222
2_2222_2222222222
2__2___2_22222222
2222222222022_022
4 18
0_222_20220222__20
_22_22_22___220222
0222_2220202202022
0020202__2_2222222
Expected Stdout
No. Output
8
1
-1
0
16
6
-1
0
0
6
16
-1
0
-1
-1
32
4
6
13
5
32
24
4
16
6
7
7
6
4
5
7
4
22
-1
28
13
17
27
19
21
40
10
2
2
Comments (2)
Sort by:
Best
Comment
1
Explore
Download App
Support
Terms
Privacy Policy
More
Copyright © 2026 LeetCode
United States