Are they same problem


Test case 3 is giving wrong answer. What’s the mistake in my code