Skip to content

Instantly share code, notes, and snippets.

@brunofarache
Created November 11, 2020 00:07
Show Gist options
  • Save brunofarache/7bbb34749a0bc6d5fd9380d4cf7d6e98 to your computer and use it in GitHub Desktop.
Save brunofarache/7bbb34749a0bc6d5fd9380d4cf7d6e98 to your computer and use it in GitHub Desktop.
object Solution {
def flipAndInvertImage(A: Array[Array[Int]]): Array[Array[Int]] = {
for {row <- A} yield row.reverse.map(_^1)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment