Skip to main content
5 events
when toggle format what by license comment
Jul 16, 2022 at 19:39 comment added Naitik Mundra I see. Thank you so much for the explanation. I understand the code much better now!
Jul 16, 2022 at 19:39 comment added Quelklef @NaitikMundra A grid of integers can be represented with an [[Int]]. But it can also be represented as an (Int, [Int]), where the Int is the grid width and the [Int] is the rows, concatenated. It could also be represented as an (Int, Int, Map (Int, Int) Int) where the first two numbers are the dimensions and the Map is a mapping from coordinates to non-zero values. Point being, "grid" is a concept distinct from [[Int]].
Jul 16, 2022 at 19:15 comment added Naitik Mundra How exactly is Grid different from [[Int]]? I thought that they were essentially doing the same thing. Am I missing something?
Jul 16, 2022 at 19:06 vote accept Naitik Mundra
Jul 16, 2022 at 18:46 history answered Quelklef CC BY-SA 4.0