Skip to content

Instantly share code, notes, and snippets.

@MattRooney
Created February 19, 2016 05:48
Show Gist options
  • Save MattRooney/342e0843e1a5c869734c to your computer and use it in GitHub Desktop.
Save MattRooney/342e0843e1a5c869734c to your computer and use it in GitHub Desktop.

Leap

My Code

  • vinibar nested their if's which makes their implementation a bit hard to read.
  • herminiotorres made his nice and short, and though it's easy to read, for someone new to JS it's a little confusing to make sense of whats happening.
  • MarcosX used many vars and then fed them into the same sort of one-line logic as herminio which doesn't seem to make the code any more explicit, just longer.
  • Turing's own Nick Weiland(ia) didn't use a prototype method, but otherwise his logic is written pretty much just as I did.
  • mbukantz wrote his pretty much exactly as I did. The best way.

Hamming

My Code

  • agazoom used a large indent, which seems harder to read. Otherwise his logic is basically the same as mine.
  • unicornzero set what seems to be an unnecessary var for strandLength and also used a while loop rather than a for loop.
  • mikeyjcat used pretty much the same setup as me but called charAt(index) and a for in loop.
  • chulmo's implementation is almost identical to mine. Nice stuff.
  • Lin4ipsum's implementation is interesting. She first called verifyLength which is cool, but then she split them into an array and mapped over the array which seems like more work than necessary.

RNA-Transcription

My Code

  • Lin4ipsum mapped again here. She loves mapping. And I apparently love for loops.
  • agazoom also mapped before then retrieving the values from his hash.
  • fultonm used a case statement which isn't a bad idea. But I think a hash is easier to read and work with.
  • enavarrocu - another hard to read case statement. And a for loop. Confusing.
  • Ivarayut - very similar to mine but he avoids having to call join on the last line by instead using += and adding to a string. I like this one.
@rrgayhart
Copy link

'The best way.' and 'She loves mapping' are my favorite parts of this submission.

Good work here!

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