6 kyu
Prime Factors
1,626 of 3,527kgashok
Description:
Prime Factors
Inspired by one of Uncle Bob's TDD Kata
Write a function that generates factors for a given number.
The function takes an integer
as parameter and returns a list of integers (ObjC: array of NSNumber
s representing integers). That list contains the prime factors in numerical sequence.
Examples
1 ==> []
3 ==> [3]
8 ==> [2, 2, 2]
9 ==> [3, 3]
12 ==> [2, 2, 3]
Algorithms
Similar Kata:
Stats:
Created | Oct 4, 2014 |
Published | Oct 4, 2014 |
Warriors Trained | 7131 |
Total Skips | 277 |
Total Code Submissions | 11899 |
Total Times Completed | 3527 |
Python Completions | 1626 |
Ruby Completions | 142 |
JavaScript Completions | 1243 |
Haskell Completions | 87 |
Objective-C Completions | 18 |
C++ Completions | 232 |
COBOL Completions | 9 |
Lua Completions | 38 |
C Completions | 175 |
OCaml Completions | 27 |
D Completions | 4 |
Rust Completions | 40 |
Go Completions | 56 |
Scala Completions | 17 |
Total Stars | 131 |
% of votes with a positive feedback rating | 94% of 561 |
Total "Very Satisfied" Votes | 504 |
Total "Somewhat Satisfied" Votes | 45 |
Total "Not Satisfied" Votes | 12 |
Total Rank Assessments | 56 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 5 kyu |
Lowest Assessed Rank | 8 kyu |