Skip to content

Instantly share code, notes, and snippets.

@andrewhassan
Created October 9, 2015 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrewhassan/19dfd88351aef754de25 to your computer and use it in GitHub Desktop.
Save andrewhassan/19dfd88351aef754de25 to your computer and use it in GitHub Desktop.

Q1

The following 2D array is data "encrypted" with a cipher.

A H A F S G !
S N A O U W S
D A D A E S S
J P A R A F W

The way to decipher it is to start at the top left element then move diagonally down and to the right. Remember the letters that you pass over. When you reach an edge, change the direction so that you're still moving right, but moving up instead. If you hit the top again, reverse the direction again and so on.

In this example the deciphered text is ANDREW!. Write a Javascript function that deciphers this assuming that the input is a 2D array.

Q2

Say you want to have 3 cards with unknown height to be placed next to each other horizontally. When it's rendered, you want the height of all of them to be the same as the height of the tallest card. Do not use JS. Write the HTML/CSS for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment