Closed vaskoz closed 4 years ago
Good morning! Here's your coding interview problem for today.
This problem was asked by Facebook.
Given an N by N matrix, rotate it by 90 degrees clockwise.
N
For example, given the following matrix:
[[1, 2, 3], [4, 5, 6], [7, 8, 9]]
you should return:
[[7, 4, 1], [8, 5, 2], [9, 6, 3]]
Follow-up: What if you couldn't use any extra space?
Identical to Day 168: https://github.com/vaskoz/dailycodingproblem-go/issues/348
Good morning! Here's your coding interview problem for today.
This problem was asked by Facebook.
Given an
N
byN
matrix, rotate it by 90 degrees clockwise.For example, given the following matrix:
you should return:
Follow-up: What if you couldn't use any extra space?