Min Li's Note
KVM,QEMU, X86 virtualization
Pages
Home
Collection
About
Thursday, August 21, 2014
Rotate Image
Problem
You are given an n x n 2D matrix representing an image.
Rotate the image by 90 degrees (clockwise).
Follow up:
Could you do this in-place?
Idea
The idea is to swap the matrix twice. Check
here
for how to swap.
Solution
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment