Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Zigzag Array solution in Clear category for Zigzag Array by cc41516
from typing import List
def create_zigzag(r: int, c: int, s: int = 1) -> List[List[int]]:
return [sorted(range(s + c*i, s + c*(i+1)), reverse = i % 2) for i in range(r)]
Nov. 3, 2018
Comments: