Nested Array: How to use && operator properly to skip some loops?

后端 未结 0 1966
梦毁少年i
梦毁少年i 2020-12-04 18:57

I\'m trying to get an "hourglass" array out from a nested array.

Say that this array is

1 1 1 0 0 0
0 1 0 0 0 0
1 1 1 0 0 0

相关标签:
回答
  • 消灭零回复
提交回复
热议问题