I hereby claim:
- I am mwicks7 on github.
- I am mwicks (https://keybase.io/mwicks) on keybase.
- I have a public key whose fingerprint is 20B4 AE45 1D43 7620 F87A A255 7246 137F BB51 EBFC
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
/** | |
* 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) { | |
var ceo = null; | |
const employeeNodes = employees.map(emp => PersonTreeNode(emp)); | |
const getNodeById = (id) => employeeNodes.filter(en => en.person.id === id)[0]; |