All Questions
20 questions
1
vote
1
answer
450
views
Recursively unpacking a javascript object
I'm seeing a React course, we were studying fundamentals of javascript for a while. We saw how to access the content of an object and display it in console. My solution for the problem of displaying ...
1
vote
0
answers
374
views
Codewars: Path Finder
Task
You are at position [0, 0] in maze NxN and you can only move in one of the four cardinal directions (i.e. North, East, South, West). Return true if you can reach position [N-1, N-1] or false ...
2
votes
1
answer
533
views
JavaScript Sudoku Recursive Solver
Thanks for all the great feedback in Part 1. I implemented a lot of it. Here is version 2. I am looking for feedback on:
Recursive solve algorithm. It's too slow. I used Chrome DevTools Performance ...
3
votes
1
answer
569
views
Find A Series of Numbers Who when Squared and Summed are equal to a given Square
I am working on a CodeWars titled 'Square into Squares. Protect trees!' it can be found here: https://www.codewars.com/kata/54eb33e5bc1a25440d000891/train/javascript
I have a working solution, the ...
1
vote
2
answers
249
views
When given 7 letters, find all possible words with length 3 to 7
I am writing a program in JavaScript to find all possible words given 7 letters. The words have to be 3 or more characters, and for right now I am limiting it to 7 characters long. The code below ...
5
votes
1
answer
1k
views
Recursively generating the look-and-say sequence
I have a pattern where every number is counted by the number of repetitions. A new resulting number is formed by adding that repetition to the front of that value. The resulting pattern would look ...
5
votes
1
answer
412
views
Recursive JavaScript permutations function
I have a recursive function that calculates the permutations of a given list/array list. Although a similar implementation works great in Python, this JavaScript ...
3
votes
0
answers
351
views
JavaScript Recursive Filtering With AND and OR [closed]
I am doing the #JavaScript30 challenge and challenge 06 is to write a "type ahead" application for searching for cities/states. The basic challenge of filtering based on a simple string was rather ...
2
votes
1
answer
3k
views
Search for layers in Adobe Illustrator by name
I am looking for some advice on some speed increases on my Adobe Illustrator (AI) script. Just so you know, the script runs fine and is at a decent speed (couple seconds to maybe a minute max for ...
7
votes
1
answer
543
views
Recursive function to get unique properties
I just wanted to share my newly created JavaScript code. This code is responsible for passing back only the unique elements for a given array. This one is quite useful when you have a huge array and ...
3
votes
1
answer
2k
views
Return path to a value in a nested object
Description:
Its not a programming challenge but I though to write a small utility which will return the path to a primitive value in a possibly nested object. The idea is not original.
Code:
...
5
votes
0
answers
187
views
Assembling and traversing a graph, given a list of items and parent pointers
I've written a function which takes input such as this:
...
3
votes
1
answer
336
views
Hand crafted longest common sub sequence
I know that the below solution is not the best one and I am in the way to learn that stuff till then I have applied the brute force to see how far I can go with my intuition.
...
5
votes
2
answers
247
views
Integer to English challenge
I have a challenge, which is to create a JavaScript function that turns a given number into the string representation. For example:
console.log(inToEnglish(15)) ...
3
votes
1
answer
155
views
Optimize CSS Rule Dumper
I have written the following Tampermonkey/Greasemonkey script. I am trying to obtain a list of all CSS rules for a page; across all stylesheets. As of now, I am just iterating over everything. Is ...