about | help | code help+videos | done | prefs |
Write a method that returns an array with the two largest prime factors of the positive input parameter. If the input parameter is prime, return an array with 1 and itself. Always return the factors in non-decreasing order. biggestPrimeFactors(5) → [1, 5] biggestPrimeFactors(28) → [2, 7] biggestPrimeFactors(100) → [5, 5] ...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: 440
Copyright Nick Parlante 2017 - privacy