careercup/CtCI-6th-Edition-Python

More pythonic solution for problem 1.7

ms940416 opened this issue · 3 comments

def rotate_matrix(a):
return map(list, zip(*a[::-1]))

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).

👏

@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.