Blocks and Long
Long in C# can store numbers up to 9,223,372,036,854,775,807. This problem requires counting the number of blocks in a grid. Not a lot of challenges other than using hashtables and calculations with longs. Code is down below, ACC. Number of Black Blocks - LeetCode 2768. Number of Black Blocks Medium 5 0 Add to List Share You are given two integers m and n representing the dimensions of a 0-indexed m x n grid. You are also given a 0-indexed 2D integer matrix coordinates , where coordinates[i] = [x, y] indicates that the cell with coordinates [x, y] is colored black . All cells in the grid that do not appear in coordinates are white . A block is defined as a 2 x 2 submatrix of the grid. More formally, a block with cell [x, y] as its top-left corner where 0 <= x < m - 1 and 0 <= y < n - 1 contains the coordinates ...