whats wrong with the code
Stock span problem
hello @2018kucp1041
make these changes in ur code

a) <= because of definition of span.
b) ( consider n=1 {5} output should 1 but urs will give 0 }. putting -1 in place of 0 will handle such cases.
ur updated code ->