Problem 55005. Sort vector by number of prime factors of each element
Sort a given array based on how many prime factors each term has. Sort from least to greatest and output original values.
Ex:
Input: [17, 23432432, 442, 12, 16, 71]
Out: [17, 71, 442, 12, 16, 23432432]
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers22
Suggested Problems
-
Change the sign of even index entries of the reversed vector
632 Solvers
-
Matrix multiplication across rows
392 Solvers
-
1793 Solvers
-
663 Solvers
-
2394 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!