Community

Gravatar

CreateFactories function call

Challenges • Asked 6 minutes ago by flightPlan

For this challenge/exercise: https://algodaily.com/challenges/closures-and-dependency-injection How would I get this createFactories(logger) function to work. I'm not sure of what to put as the argument in place of 'looger' parameter in the funct...


Gravatar

Would this not be a simpler solution?

Challenges • Asked 3 days ago by rudebowski

For the detect substring in a string problem, here was the solution offered: function detectSubstring(str, subStr) { let idxOfStart = 0, j = 0; for (i = 0; i < str.length; i++) { // if match, compare n...


Gravatar

Validate Palindrome

Challenges • Asked 3 months ago by Jake

I think for the solution you provided, we must account for the case of the character or letter as well as the whitespaces.<p>So here's my solution:</p><p><code><br>/* jshint esversion: 6 */<br><br>function isPalindrome(str) {<br>if (! isAlphaNumer...


Gravatar

Is An Anagram

Challenges • Asked 3 months ago by Jake

Since the previous challenge already mentioned time complexities. It should be mentioned that the sorting solution is Quasilinear O(n log n) and a linear solution exists. If you create a set from both strings O(n+m) and then check that both string...


Gravatar

Array Intersection

Challenges • Asked 3 months ago by Jake

oh my gosh