Feeds
已解决
Count the primes in Collatz sequences
Several Cody problems (21, 69, 42937, 44448, 44784, 52422) involve Collatz sequences. These start with a seed . If is odd, the ...
11 months 前
已解决
Construct a "diagAdiag" matrix
Construct a matrix whose elements begin from 1 and end at n^2 with the order of arrangement as shown below: For: n = 4 ...
11 months 前
已解决
Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...
12 months 前
已解决
List the good primes
The th prime is classified as “good” if for . For example, 5 is a good prime because is greater than and , but 7 is not beca...
1 year 前
已解决
Cumulative maximum of an array
Find the cumulative maximum of an array without using the built-in function cummax (and a few others). Your function should act ...
1 year 前
已解决
Polite numbers. Politeness.
A polite number is an integer that sums of two or more consecutive positive integers. Politeness of a positive integer is a num...
1 year 前
已解决
Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...
1 year 前
已解决
Alphabetize by last name
Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...
1 year 前
已解决
The Goldbach Conjecture
The Goldbach conjecture asserts that every even integer greater than 2 can be expressed as the sum of two primes. Given the eve...
1 year 前
