id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us primenumbers > listFactors
prev  |  next  |  chance

Given an integer greater or equal to 2, return an array of the integer prime factors of the input parameter. These prime factors must be in increasing order. Multiplying the complete list of prime factors together will produce the original input parameter. Note that each number will have at most 30 prime factors.


listFactors(1098482931) → [3, 3, 3, 7, 7, 13, 13, 17, 17, 17]
listFactors(2) → [2]
listFactors(7) → [7]

...Save, Compile, Run (ctrl-enter)

public int[] listFactors(int num) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 440

Copyright Nick Parlante 2017 - privacy