FIND UPPER AND LOWER Can you please tell me whats wrong with my code

only test case 4 is being passed.
in rest its showing run error

Just change the size of array as, a[1000000] and then try to submit your code…