Skip to content

Instantly share code, notes, and snippets.

View JosephShering's full-sized avatar
🏠
Working from home

Boons JosephShering

🏠
Working from home
  • Pyroblast Games
  • Portland, OR
View GitHub Profile
@JosephShering
JosephShering / index.js
Last active March 1, 2018 19:07
datadog coding challenge
const get_tag_counts = function(stream) {
const unsortedTags = {};
const sortedTags = [];
stream.forEach(function(row) {
const splitRow = row.split('|');
const tags = splitRow[2] || '';
/**
* Given an array of Person objects, returns the root PersonTreeNode (the CEO).
* @param {Person[]} employees - An array of Person objects representing all the employees of the company.
* @returns {PersonTreeNode} The CEO of the organization.
*/
function generateTree(employees) {
/**
* @ignore
* INSTRUCTIONS:
* 1. ONLY edit this function and nothing else!.