search

Home  >  Q&A  >  body text

Please tell me how to write a rotating square matrix of letters using js

Given two integers M, N, generate an M*N matrix. The element value in the matrix is ​​one of the 26 letters from A to Z. A is in the upper left corner, and the remaining numbers are in clockwise direction. Rotate forward and place them incrementally. When it exceeds 26, A starts to fill in. For example, when M=5, N=8, the contents of the matrix are as follows: A B C D E F G H V W X Y Z A B I U J K L M N C JT I H G F E D KS R Q P O N

 修 修1315 days ago1159

reply all(1)I'll reply

  • 猪老湿

    猪老湿2021-07-13 10:29:30

    Multiple loop implementation

    reply
    0
  • Cancelreply