More pythonic solution for problem 1.7
ms940416 opened this issue · 3 comments
ms940416 commented
def rotate_matrix(a):
return map(list, zip(*a[::-1]))
ricardo-valerio commented
yeah, I guess the whole point is to think about the algorithm instead of a particular built-in function that does the work for us...but mentioning it in the file as an "extra" for an interview makes sense. (it shows a deeper knowledge of the language).
zhangdavids commented
👏
brycedrennan commented
@ms940416 if this solution is the fastest, you could submit it under the recently added "speed" category.
This issue is so old I suspect you've moved on to other things so I'm closing for now.