Plan and done for June-18-2017
What will I learn today?
- Dive into JS.
Done
-
Switched to hackerrank - https://www.hackerrank.com - for a while to practice algorithms and to improve velocity in coding with Javascript, get fluency in it.
There were two problems that I've solved - find the cost of transformation of any 3x3 matrix into a magic square matrix (https://www.hackerrank.com/challenges/magic-square-forming); manipulate given strings symbol by symbol to morph one into another (https://www.hackerrank.com/challenges/append-and-delete).
RescueTime (https://www.rescuetime.com) said that I've spent almost 8 hours. What is this? First three hours I tried to get into approach to magic square solution. First I used Excel in search of some hints on how to calculate it faster. Then I just switched into Octave and started matrix manipulation routines - rotation, flipping, substracting. It showed results so I get back to code editor and implemented all these basic matrix transformations in JS. The final solution was easy when I've got all tools needed. Limit is that the matrix could be only 3x3. The main reason for the limit is that I don't understand quite well how to find all possible matrix rotation and flipping algorithmically. There are some interesting links: how to build an array filled with constants - https://stackoverflow.com/a/13735425; someone's example of rotation of any matrix - http://jsfiddle.net/MrPolywhirl/NH42z/.
And the second problem was much easier to solve - RescueTime showed it took only 1.5 hours.
Too slow...