Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Aug 17 09:32
    User @bjorno43 unbanned @linkin-park
  • Jun 20 21:19
    @bjorno43 banned @shenerd140
  • Apr 25 17:13
    @mstellaluna banned @cmal
  • Jan 08 22:05
    @mstellaluna banned @dertiuss323
  • Nov 07 2018 04:42
    User @texas2010 unbanned @ows-ali
  • Nov 02 2018 16:25
    @texas2010 banned @ows-ali
  • Oct 12 2018 05:50
    @bjorno43 banned @NACH74
  • Oct 05 2018 23:02
    @mstellaluna banned @JomoPipi
  • Sep 16 2018 12:21
    @bjorno43 banned @yash-kedia
  • Sep 16 2018 12:16
    @bjorno43 banned @vnikifirov
  • Sep 05 2018 08:12
    User @bjorno43 unbanned @androuino
  • Sep 05 2018 07:38
    @bjorno43 banned @androuino
  • Aug 23 2018 16:57
    User @bjorno43 unbanned @rahuldkjain
  • Aug 23 2018 16:23
    @bjorno43 banned @rahuldkjain
  • Jul 29 2018 14:13
    User @bjorno43 unbanned @jkyereh
  • Jul 29 2018 01:00
    @bjorno43 banned @jkyereh
  • Jul 10 2018 22:09
    @bjorno43 banned @manafn
  • Jul 06 2018 15:20
    @texas2010 banned @imlegend19
  • Jul 03 2018 12:28
    @bjorno43 banned @vbvmatta
  • Jun 29 2018 13:54
    @bjorno43 banned @OGTechnoBoy
Victor
@VictorHall
my problem is on line 23
i cant commute the last to conditions [1,13] and [23, 18]
Tom
@moT01
so it works for the other tests?
Victor
@VictorHall
on line 23 i compute values in my loop greater than 100000
it completely crashes
yes
[1,5] returns 60 in my final array
if i could compute values greater than 100000 it would work
Tom
@moT01
when you try to compute up to 100000 it crashes, ...it says 10000 as i see it
Victor
@VictorHall
yes but change it
it will crash
Tom
@moT01
still wouldn't work for that last test, ...6million
or the second to last one
i was having a similar issue if i recall, ...might need to find another way to go about it
Victor
@VictorHall
yea
i will have too. I just dont know how i will compute values that large
or even test for smaller values
@moT01
Tom
@moT01
i could show you my solution if you want, ...trying to go through your code and see if i can find a way to optimize it better
Victor
@VictorHall
i dont want the solution just yet
Tom
@moT01
you are making some huge arrays on that line
Victor
@VictorHall
yes but in line 32 i condense it to values that both arrays have in common
i put them into the leastCommon arrawy
*array
Mitchell Stewart
@mitchstewart08
why are you looping that high
Victor
@VictorHall
@mitchstewart08 how am i going to test which values are multiples of all values in the range if i can reach that value ?
I need to reach that value in line 23
then in 32 it is condensed into values that both are arrays have in common
Tom
@moT01
i think youre going about it the wrong way, ...that's whats causing the problem
youre using too much memory or processor or whatever it is
creating and going through those huge loops is too much
Mitchell Stewart
@mitchstewart08
yeah
it's almost worse than O(n^2)
Tom
@moT01
i started with an array of the numbers in the range
Victor
@VictorHall
@mitchstewart08 lol i know its bad
@moT01 okay
ill give it another shot
Tom
@moT01
not that bad
it would work
if you had a super computer
maybe
Victor
@VictorHall
@moT01 thanks
CamperBot
@camperbot
victorhall sends brownie points to @mot01 :sparkles: :thumbsup: :sparkles:
:warning: victorhall already gave mot01 points
Tom
@moT01
one way to maybe limit the loops performed would be to start a loop at all the numbers in the range multiplied by each other
i dont think i did that, but pretty sure it would work
wait, maybe not
something along those lines might help
John Nunns
@johnnunns
Any js experts on ?? :)
Tom
@moT01
im no expert, but i can try to help if you want