(N)
| 188 | |
| 189 | |
| 190 | def traverse_grid_v1_continuous(N): |
| 191 | path = [] |
| 192 | direction = "right" # initial direction |
| 193 | for i in range(N): |
| 194 | if direction == "right": |
| 195 | for j in range(N): |
| 196 | path.append(i * N + j) |
| 197 | if i != N - 1: # if not the last row |
| 198 | direction = "left" |
| 199 | elif direction == "left": |
| 200 | for j in range(N - 1, -1, -1): |
| 201 | path.append(i * N + j) |
| 202 | if i != N - 1: # if not the last row |
| 203 | direction = "right" |
| 204 | return [path, list(reversed(path))] |
| 205 | |
| 206 | |
| 207 | def test_hibert_fig(num_dims=2, img_size_power=3): |
nothing calls this directly
no outgoing calls
no test coverage detected