Tuesday, December 6, 2016

HackerRank - Matrix Rotation - Code Review Series 1 of 10+

Dec. 6, 2016

Problem statement:
https://www.hackerrank.com/challenges/matrix-rotation-algo

Review first 10 C# submissions, and code review one by one:

Study code:
https://gist.github.com/jianminchen/8ee835834a9a6cdb68331695a3c1abb1

Review code, and make the change:
https://gist.github.com/jianminchen/e943a9e7b86d24e9f36c04f1f3502941

Main changes:

Use meaningful names, and declare one extra variable: actualSteps, line 63.
line 67, variable name: firstOneInStrip

Express the intent.

No comments:

Post a Comment