Code submitted with wa
hi @2020uec2022 refer ive commented and please try avoiding 1 based indexing u yourself will confuse with that
 
      
    hi @2020uec2022 refer ive commented and please try avoiding 1 based indexing u yourself will confuse with that