Giter Club home page Giter Club logo

apply's Introduction

Exercise

Write a function that compresses an alphanumeric string by collapsing consecutive values. The rules of the compression algorithm are defined by the test cases below.

Test cases

Each item below has an input value and the expected output from the function.

  1. aaabccccdda3bc4d2
  2. aaaaaffffffffffca5f10c
  3. abcdabcd (note: not a1b1c1d1)
  4. ccceee12eccceeec3e4c3e3 (numbers removed)
  5. effeac01cb65cef2eac2bc

Timeboxing

Try to complete this task within 30 minutes.

What we'll be looking at

  • Code structure — specifically how readable and understandable it is
    • (Optional) Consider using of whitespace and inline doc strings for clarity
  • Git usage — granularity of commits and any branches or tags
  • Edge cases — how they're handled so they won't be forgotten
    • (Optional) Describe or implement a solution for each case (if any)
  • Bonus: Add a very basic test for each case

What we won't be looking at

  • Language — use whatever programming language you're most comfortable with
  • Number of lines — it can be any length as long as it's readable and understandable
  • Time spent — just be honest and tell us how you used the time

How to submit

  1. Fork this repo to a public one on your account
  2. Add an empty file for your code and make a commit
  3. Make commits as you're working to help show your work
  4. When you're done submit your fork as a pull request back to this repo
  5. Send the link to [email protected] with some details about your experience.

apply's People

Contributors

ngunner15 avatar delano avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.