node-io-practice
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
.jshintrc
README.md
final.js
index.js
org_chart_sample.in
org_chart_sample.out
package.json
sum.in
sum.out
sum_sample.in
sum_sample.out

README.md

node-io-practice

This is a coding project I completed as part of an interview process. The coding project tested knowledge of Node.js, recursion, file I/O, and most importantly, creating dependency trees.

Objective:

The objective of the project was the following:

  • Read an input file (org_chart_sample.in), a CSV-like file with data about an imaginary organization's employees.
  • Parse the input, given a predefined pattern:
    • line 1 has the number of rows (test cases) to expect
    • Each test case has employees (name, supervisor name, Title, Year started), separated by "--"
  • Create a dependency tree starting with CEO, and write file to disk (org_chart_sample.out).

Files

Running

$ node ./final.js

Note: org_chart_sample.out will be overwritten.