I'm seriously struggling to solve this algorithm. I know the solution will be recursive, but i'm stumped on how to solve this problem. Feel free to take a crack at it. Thank you
Problem: ['a','b','c',['d','e','f',['g','h']], [i, j, k]]
Output:
{
a: true,
b: true,
c: true,
d: {
e: true,
f: true,
g: {
h: true
}
},
i: {
j: true,
k: true
}
}