Skip to main content

All Questions

Tagged with
7 votes
1 answer
273 views

In short, the algorithm must find the longest sequence that joins together common sequences from two lists (a more formal specification is given in the code's header). The lists are assumed to contain ...
user266319's user avatar
7 votes
1 answer
791 views

I am writing a function that takes an array and an integer number and returns an array of all the partitions into subarrays (so an array of arrays of subarrays). The number of subarrays is exact the ...
Joji's user avatar
  • 335
0 votes
1 answer
177 views

My function accepts a number, which generates total Fibonacci numbers. I am using recursion. Please follow the code below, ...
Rahul Shivsharan's user avatar
0 votes
1 answer
402 views

The code below is my first purpose built asynchronous recursive function. It took me a while to figure out how to write the thing, and I would like a second opinion. It's part of a project for The ...
ablueblaze's user avatar
2 votes
2 answers
246 views

take an array of two numbers who are not necessarily in order, and then add not just those numbers but any numbers in between. For example, [3,1] will be the same as 1+2+3 and not just 3+1. ...
Elbasel's user avatar
  • 642
1 vote
1 answer
468 views

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 ...
sɪʒɪhɪŋ βɪstɦa kxɐll's user avatar
1 vote
0 answers
395 views

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 ...
Михаил Спирин's user avatar
1 vote
1 answer
4k views

Problem Statement I need to access a deeply nested object. I could've used a 3rd party util such as Lodash but insisted myself on writing a Vanilla JS solution with a recursive strategy. Code Can this ...
Vinay Sharma's user avatar
0 votes
1 answer
369 views

Would someone review this code, and confirm that it is indeed recursive? I'm learning computer science and going through different types of algorithms. Right now, I'm focusing on recursion want to ...
andrewlundy_'s user avatar
3 votes
2 answers
1k views

I am trying to pretty print the directory structure defined in a JSON. I do have a solution using recursion but I'm looking for feedback on how this solution can be ...
Vinay Sharma's user avatar
3 votes
0 answers
264 views

I am new to programming. I tried to write a valid Sudoku solver with backtracking, the performance is disappointing. So, I tried to generate a valid Sudoku generator without backtracking. The white ...
Jason Rich Darmawan's user avatar
2 votes
1 answer
387 views

I use this function in browser automation. It pings the document in the browser to check if an element we are looking for is available (useful when there is JavaScript generated async content). If it'...
M3RS's user avatar
  • 413
2 votes
1 answer
573 views

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 ...
RedDragonWebDesign's user avatar
2 votes
1 answer
83 views

I am creating routes from an array of menuItems. I have written a recursive function, which works fine but I think the code can be improved. So, I need you guys to review my code and suggest me some ...
Vishal's user avatar
  • 197
1 vote
1 answer
120 views

I've written a function to create an HTML tree from JSON. ...
oldboy's user avatar
  • 151

15 30 50 per page
1
2 3 4 5
7