Community

Ask A Question

Gravatar

CreateFactories function call

ChallengesAsked 27 days 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?

ChallengesAsked 2 months 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

ChallengesAsked 5 months ago by pablodeltoro

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

ChallengesAsked 5 months ago by pablodeltoro

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

ChallengesAsked 5 months ago by pablodeltoro

oh my gosh

Terms and Conditions | Privacy