April 18, 2016
Rotate array - HackerRank
problem statement:
https://www.hackerrank.com/challenges/matrix-rotation-algo
Study other's code:
https://gist.github.com/jianminchen/c234a238ea331ea9a037d603c37a6649
So, do not swap two nodes value, just save first node's value in a variable, and then, shift array kind operation.
Write C# solution:
another practice: (more than 1 hour, still having bugs, score 8.89/ wrong answer)
https://gist.github.com/jianminchen/57572227dafe939060f7cc81b193cd9b
Time spent:
More than 2 hours
No comments:
Post a Comment