Problem 43995. convert 2D array of ones and zeros to checkerboard array of [1,2] where the original array was ones and zero elsewhere

Given a 2D array of ones and zeros, generate an equivalent sized checkerboard array of ones and twos. The checkerboard pattern starts with 2:


Then set this checkerboard array to zero wherever the original was zero.

Solution Stats

58.54% Correct | 41.46% Incorrect
Last Solution submitted on Feb 08, 2019

Problem Comments

Problem Recent Solvers13

Suggested Problems

Problem Tags