All Questions
10 questions
6
votes
2
answers
459
views
Selection Sort Algorithm (Node.js)
I wanted to implement a selection sort and wanted to make sure that I'm doing it correctly. I wanted to do it in a way that's efficient and use recursion. Please let me know if I am doing this ...
3
votes
0
answers
202
views
JSON flattening with object duplication on array property for CSV generation
I am looking for a way to transform JSON data into a flat "csv-like" data object. In some way, I am looking to "sqlirize" a mongodb collection. I have already check some json flat libraries in NPM ...
2
votes
0
answers
51
views
Flatten Hierarchical Categories
I have an XLSX file that contains a hierarchical list of categories. Each category has a basic query associated with it. I need to flatten these categories which involves combining the categories. I ...
0
votes
4
answers
5k
views
Array decomposing recursive function in JavaScript
What I need is to remove first word from the string again and again until only one word is left, and put it all into array.
For example, I have this string as an input:
...
3
votes
0
answers
566
views
Recursively list files in provided directory in the style of `npm ls`
I've written a small CLI node program to list the contents of a directory with an output similar to that provided by npm ls but listing both files and directories, ...
3
votes
1
answer
576
views
Recursion into git diff tree using nodegit
I'm using nodegit to develop the backend for a nodejs app that uses a mix of mongodb and git for persistence. The app has to version documents and be able to present diffs between versions, thus the ...
3
votes
1
answer
72
views
Recursive function to copy over an object with very specific constraints
I totally suck at recursion. I have a function that works but it also looks horribly wrong. I would love to 1) Know how to write it properly 2) Know about resources to read/study so that I don't get ...
3
votes
2
answers
1k
views
Generate URLs from a complex JSON object using recursion
My task is here as follows :
Input : A complex/nested JSON object with nested arrays as well
objects
Output : A JSON object that contains a set of URLs with their titles:
( key,value ) ...
2
votes
1
answer
571
views
Retaining depth information and recursive traversals
I have been using the pattern below for some time and it has worked well, but more than once I have almost bled my brain out of my ear trying to keep track of:
the recursion depth
the recursion path
I ...
3
votes
2
answers
7k
views
Recursively reading a directory in node.js
I made a function for recursively reading a directory and it just seems kind of long and complicated. If you could take a look and tell me what's good or bad about it, that would be great.
Reading ...