How would you solve the Look-and-Say sequence with no strings attached?

BTI360 Blog / July 16, 2014 in 

Yesterday, we reviewed Chris’ test-driven code he wrote for the Look-and-Say sequence for our code kata challenge. Today, we will stick with java and see how Andy likes to roll with no strings attached!

No Strings Attached

Andy wrote in JavaScript and used JSFiddle at the event, but later submitted this example to us.

What’s unique about this example is that he implemented the sequence generator with a function that, rather than taking a string input and returning a string output, takes and returns integer types instead.  This was one of the optional challenges discussed towards the end of the event.

Take a look at Andy’s code…

Previous

How would you code the Look-and-Say sequence?

Next

How to Code Kata Ruby Style

Close Form

Enjoy our Blog?

Then stay up-to-date with our latest posts delivered right to your inbox.

  • This field is for validation purposes and should be left unchanged.

Or catch us on social media

Stay in Touch

Whether we’re honing our craft, hanging out with our team, or volunteering in the community, we invite you to keep tabs on us.

  • This field is for validation purposes and should be left unchanged.