vaskoz / dailycodingproblem-go

problems from dailycodingproblem.com solved in Go
MIT License
95 stars 31 forks source link

Day 468 #949

Closed vaskoz closed 4 years ago

vaskoz commented 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.

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?

vaskoz commented 4 years ago

Identical to Day 168: https://github.com/vaskoz/dailycodingproblem-go/issues/348