about | help | code help+videos | done | prefs |
Let's find all factors for any integer. You do remember how to factor... right well, we will find all of the factors of a number. We will place a ONE into an array of integers where the subscript is the factor. Example 24 [0,1,1,1,1,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1] allFactors(24) → [0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1] allFactors(1) → [0, 1] allFactors(2) → [0, 1, 1] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 100
Copyright Nick Parlante 2017 - privacy