WA in MINSUBAR

,

getting wa even after trying a lot of times



thanks in advance

length of array ‘a’ is only ‘n’ but in the last iteration of the loop you are accessing index ‘n’ so i think you should change it and try again.