Skip to content

Instantly share code, notes, and snippets.

@sherjilozair
Created December 11, 2021 16:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sherjilozair/eff1d77248cd9b7b810f85101ad580da to your computer and use it in GitHub Desktop.
Save sherjilozair/eff1d77248cd9b7b810f85101ad580da to your computer and use it in GitHub Desktop.
// replace all -1 with 0
for i in 0..input.len() {
for j in 0..input[i].len() {
if input[i][j] == -1 {
input[i][j] = 0;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment