Git Product home page Git Product logo

cypher's Introduction

Caesar Cypher

It was said that Julius Caesar protected his private documents by encrypting them using a cipher. The cypher works by taking each letter of the input text and shifting it by a number of letters. If the shift takes the letter past the end of the alphabet then it moves back to the beginning of the alphabet. In the case of a shift by 2, w, x , y and z would map to y, z, a, b. Case ought to be preserved, and any non-(A-Z/a-z) characters are left unmodified. The challenge this week is to encrypt the entirety of Jane Austin's "Pride and Prejudice" as fast as possible (without using any compile-time pre-computation).

Rewards

  • five: Points are awarded for encoding the book in under 500ms*
  • two: Further points are awarded for encoding the book in under 100ms*
  • two: Further points are awarded for encoding the book in under 50ms* The remaining 1️⃣ point is awarded to the fastest submission.

Performance will be tested on MacBook Pro (2019)

To run code:

Go

  • cd into go directory
  • Optionally, change the shift value (line 17)
  • run go run .

To run tests run go test

Javascript

  • cd into js directory
  • Optionally, change the shift value (line 13, index.js)
  • run node index.js

To run tests run npm t

cypher's People

Contributors

elena-cav avatar

Watchers

 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.