Giter Site home page Giter Site logo

take_home_coding_test's Introduction

The PII Problem

Process PII (Personally Identifiable Information) int


o JSON documents. Please use Java, JavaScript, PHP or Python to solve this problem. Extra credits for well thought out design and attention to quality.

Input to your program

A file with each line contains “PII”, information, which consists of a first name, last name, phone number, favorite color and zip code. The order and format of these lines vary in several ways, but for this test, the following three different formats are observed:

 LastName, FirstName, (703)-711-0996, Blue, 11013  FirstName LastName, Purple, 14537, 713 905 0383  FirstName, LastName, 12023, 636 121 1111, Yellow

Input file may contain invalid lines and should not interfere with the processing of subsequent valid lines. For simplicity, a line is invalid if its phone number does not contain the proper number of digits.

Output from your program

The program outputs a valid, formatted JSON object. The JSON representation should be indented with 2 spaces and the keys should be sorted in ascending alphabetical order by (last name, first name)

Successfully processed lines should result in a normalized addition to the list associated with the “entries” key. For lines that were unable to be processed, a line number i (where 0 ≤ i < n) for each faulty line should be appended to the list associated with the “errors” key.

Important note: Please format the JSON with exactly two spaces for every indentation. Our automated tests will not pass otherwise. Your program must execute the following way

Solution < inputfile.txt > outpufile.txt or Solution –in inputfile.txt -out outpufile.txt Attached are the sample input and output files.
Please submit a zip file or a Git Repository with your solution.

take_home_coding_test's People

Contributors

niski84 avatar

Watchers

James Cloos avatar  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.