Hackerrank Day 11: 2D Arrays



My Solution in Ruby:


This problem was a lot easier to tackle once I’ve sketched out the formula for calculating each hourglass.  That’s why I bought a notebook to derive future algorithms!

Also downloaded git and cleaned up my github today!  A few commands to remember when adding files and committing changes:

  1. Stage the file: git add .filename
    • stage a folder with files: git add folder/subfolder/*
  2. Commit: git commit -m “enter notes/messages about the changes
  3. Push to master branch: git push origin master
    • Push to another branch: git push origin BRANCH_NAME
Hackerrank Day 11: 2D Arrays

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s