Mean number of letters per word (Easy)
Given a character array, s, representing a sentence, return a, the arithmetic mean of the number of letters per word in the give...
約6年 前
解決済み
Sum Sum Sum!
Calculate the sum of the natural numbers from 1 to n
Cannibal eating odd and even numbered men
There are N men in a queue. A cannibal eats either all odd-numbered or all even-numbered men in the queue at a time. In the fi...
約6年 前
解決済み
SAY 'OHYEAH'
Regardless of input, output the string 'OHYEAH'.
約6年 前
解決済み
Check prime numbers
Let x, return 1 if x is a prime number, 0 otherwise
e.g x = 7, return y =1;
x = 6 return y = 0;
Singular Value Decomposition
Calculate the three matrices of the singular value decomposition (A = U*S*V^T) for each provided matrix. U and V are square unit...
約6年 前
解決済み
Next lexicographic - permutation
Find next lexicographic - permutation (permutations as it would occur in a dictionary order).
E.g: nextP('ABCD') = ABDC
I...
約6年 前
解決済み
Calculating large fibonacci numbers
The fibonacci sequence starts 1,1,2,3,5,8...
Find the the n'th fibonacci number. Then calculate round(log10( . )) of that n't...
約6年 前
解決済み
Mid-term report
You just got your mid-term report, but it's full of ones and twos :(. So before you give it to your parents, you change it, in o...
約6年 前
解決済み
Anagram
Given two strings, check whether they're anagrams to each other or not.
約6年 前
解決済み
The Tortoise and the Hare - 01
Suppose in an infinitely long line, the hare is standing in position 0.
From that place, it can jump either in the +ve direct...
約6年 前
解決済み
Frugal number
check whether n is a frugal number
* a frugal number is a natural number in a given number base that has more digits than the...
約6年 前
解決済み
Iccanobif numbers 1
There are a lot of problems in Cody that deal with Fibonacci numbers (1, 1, 2, 3, 5, 8, 13, 21 etc...) so let's turn things arou...
Large Sum (inspired by Project Euler 13)
Your function will be provided an arbitrary number of numbers of arbitrary sizes as a cell array of strings. Some numbers will b...
You never ask a lady her age
Instead you ask her to multiply her age by 10, then subtract any of the first nine multiples of 9 (9,18,...,81), and tell you th...
約6年 前
解決済み
An Ohm's Law Calculator
*BACKGROUND / MOTIVATION:*
Many important observations in math and science can be described by short, but powerful, equations...