Testcase getting wrong after Submission of optimal solution

google
programming
interview-questions
Tags: #<Tag:0x00007f24289e6288> #<Tag:0x00007f24289e6008> #<Tag:0x00007f24289e5dd8>

#1

I just followed the approach given in the solution. But still, failing the test cases. Please suggest a valid test case that I might be failing because I’m unable to understand where my code is getting wrong.


#2

Use Long long during declaration of int variable.