Gelöst


Hankelize a matrix
Similar to <http://www.mathworks.com/matlabcentral/cody/problems/42501-toeplitize-a-matrix Problem 42501. Toeplitize a matrix>, ...

mehr als ein Jahr vor

Gelöst


Spherical radius given four points
Determine the radius of a sphere provided four non-coplanar points on the surface of the sphere. pts = [x1 y1 z1; x...

mehr als ein Jahr vor

Gelöst


Angles of the hands of a clock
For this problem, consider an analog (or at least continuous digital representation) of a clock. Our clock is a 12 hour clock w...

mehr als ein Jahr vor

Gelöst


Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

mehr als ein Jahr vor

Gelöst


Leap years on other planets
A year is a leap year if it is divisible by 4, but not if it is divisible by 100, unless it is also divisible by 400. This mean...

mehr als ein Jahr vor

Gelöst


Project Euler: Problem 14, Longest Collatz sequence
The following iterative sequence is defined for the set of positive integers: n → n/2 (n is even) n → 3n + 1 (n is odd) U...

mehr als ein Jahr vor

Gelöst


Missing five
Convert decimal numbers to a base-9 notation missing the digit *5* <<http://www.alfnie.com/software/missing5.jpg>> Too man...

mehr als ein Jahr vor

Gelöst


minimum numbers of 1 to build n
The (Mahler-Popken) complexity of n: minimal number of 1's required to build n using + and *. see A005245. In this problem, yo...

mehr als ein Jahr vor

Gelöst


Concatenate input positive integers to obtain a maximum.
Input some integers, you need to concatenate them to obtain a maximum integer. Neither use library function "perms" to list all ...

mehr als ein Jahr vor

Gelöst


Easy Sequences 30: Nearly Pythagorean Triangles
A Nearly Pythagorean Triangle (abbreviated as "NPT'), is an integer-sided triangle whose square of the longest side, which we wi...

mehr als ein Jahr vor

Gelöst


Pi Estimate 1
Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>

mehr als ein Jahr vor

Gelöst


Generate pi using logarithm
Generate pi using logarithm

mehr als ein Jahr vor

Gelöst


Pi Digit Probability
Assume that the next digit of pi constant is determined by the historical digit distribution. What is the probability of next di...

mehr als ein Jahr vor

Gelöst


Hexagonal numbers on a spiral matrix
Put hexagonal numbers in a ( m x m ) spiral matrix and return the sum of its diagonal elements. Formula of hexagonal numbers ...

mehr als ein Jahr vor

Gelöst


Ned's queens
A tribute to Cody's five-year anniversary should also celebrate the people behind Cody, and in this particular case, our illustr...

mehr als ein Jahr vor

Gelöst


2048 Next Move
Given a board in the game 2048 (see the game here: <http://gabrielecirulli.github.io/2048/ 2048>) and a direction ('up','down','...

mehr als ein Jahr vor

Gelöst


Joining Ranges
You are given a n-by-2 matrix. Each row represents a numeric range, e.g. x = [0 5; 10 3; 20 15; 16 19; 25 25] contains...

mehr als ein Jahr vor

Gelöst


Kaprekar Steps
6174 is the <http://en.wikipedia.org/wiki/6174_%28number%29 Kaprekar constant>. All natural numbers less than 10,000 (except som...

mehr als ein Jahr vor

Gelöst


The Goldbach Conjecture
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

mehr als ein Jahr vor

Gelöst


Elapsed Time
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

mehr als ein Jahr vor

Gelöst


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

mehr als ein Jahr vor

Gelöst


Draw a '8' in a zero matrix!

fast 2 Jahre vor

Gelöst


Sophie Germain prime
In number theory, a prime number p is a *Sophie Germain prime* if 2p + 1 is also prime. For example, 23 is a Sophie Germain prim...

fast 2 Jahre vor

Gelöst


Project Euler: Problem 5, Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

fast 2 Jahre vor

Gelöst


Is this triangle right-angled?
Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...

fast 2 Jahre vor

Gelöst


Is the Point in a Triangle?
Check whether a point or multiple points is/are in a triangle with three corners Points = [x, y]; Triangle = [x1, y1; x...

fast 2 Jahre vor

Gelöst


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

fast 2 Jahre vor

Gelöst


Find max
Find the maximum value of a given vector or matrix.

fast 2 Jahre vor

Gelöst


given number is power of n or not?
Check weather The input is power of n or not? for example x=8,n=2 --> true x=6,n=2 --> false

fast 2 Jahre vor