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
Tom
@moT01
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
John Nunns
@johnnunns
@moT01 I'm on the Record Collection problem
And I'm struggling badly
quackidy
@quackidy
Thank you so much @dwquach and @khaduch
CamperBot
@camperbot
quackidy sends brownie points to @dwquach and @khaduch :sparkles: :thumbsup: :sparkles:
:cookie: 277 | @dwquach |http://www.freecodecamp.com/dwquach
:star2: 2178 | @khaduch |http://www.freecodecamp.com/khaduch
Tom
@moT01
yea, can you be more specific at all? have any code to show?
Ken Haduch
@khaduch
@johnnunns - please post your code. It's not really too difficult once you get going in the right direction.
John Nunns
@johnnunns
function updateRecords(id, prop, value) {
  if(collection.tracks.hasOwnProperty()){
    return collection;
  }else if (collection.tracks.hasOwnProperty === false){
    collection.tracks.push
  }
It's very unfinished, I'm not sure if I'm headed in the right direction
Ken Haduch
@khaduch
@johnnunns - one question - does collection have a tracks property, ever? What kind of properties does collection have - the "first level" of properties. For that matter, what kind of structure is collection?
John Nunns
@johnnunns
I guess what you're telling me is that the tracks property belongs to the id which is the record number. correct?
so if I were going to push, it'd have to be collections.2548.tracks.push()