已解决


Recycled Numbers (CodeJam Qualification Round 2012)
Let's say a pair of distinct positive integers ( _n_ , _m_ ) is recycled if you can obtain _m_ by moving some digits from the ...

9 years 前

已解决


GJam 2017 Kickstart: Leader (Small)
This Challenge is derived from <http://code.google.com/codejam/contest/6304486/dashboard#s=p0 GJam 2017 Kickstart Leader>. This ...

9 years 前

已解决


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 ...

9 years 前

已解决


Equal temperament - musical notes and frequency
Starting from 440Hz note (musical note A above middle C), create 13 notes, using twelve-tone equal temperament, in Herz units. ...

9 years 前

已解决


Fractal: area and perimeter of Koch snowflake
Starting from an equilateral triangle with side 's', what is the area and perimeter of Koch snowflake at n'th recursive iteratio...

10 years 前

已解决


The number of trailing zero digit of a factorial
For given positive integer n, take factorial of that number. How many trailing zeros does it have? Example: factorial(11) = 3...

10 years 前

已解决


Polar Form Complex Number Entry
Write a function that takes the magnitude and angle(in degrees) of a complex number and returns a complex variable. Positive ang...

10 years 前

已解决


Pascal's triangle
<https://en.wikipedia.org/wiki/Pascal%27s_triangle> if the order is: x = 3; the output will be: output = [0 0 0 1 0 0 ...

10 years 前

已解决


Convex Hull Capture
Imagine four points in uv that form a square. uv = [ ... 0,0; 0,2; 2,2; 2,0]; Now we have two more po...

10 years 前

已解决


convert 2D array of ones and zeros to checkerboard array of [1,2] where the original array was ones and zero elsewhere
Given a 2D array of ones and zeros, generate an equivalent sized checkerboard array of ones and twos. The checkerboard pattern s...

10 years 前

已解决


Union Jack Matrix
Create a matrix of odd dimensions that has ones on both diagonals and dividing the matrix into 4 quadrants, resembling a square ...

10 years 前

已解决


Permute the matrix after unique(but not sorted)
Given an vector A, try to get the matrix B, which each row is the same vector after 'unique function'. For example, A =[2 5 3 4 ...

10 years 前

已解决


Count the Digits in the Box
In this problem you must provide an accurate census of all the digits inside a given box. The problem is complicated by the fact...

10 years 前

已解决


Cookie Cutters
Given a larger and smaller matrix, perform element-by-element multiplication on the smaller matrix and a sub-matrix of the large...

10 years 前

已解决


Vandermonde Matrix
Create the Vandermonde Matrix of the given vector. The matrix consists of columns as powers of the vector, so the first column i...

10 years 前

已解决


Laguerre Polynomial
Create a square lower diagonal matrix containing the first n Laguerre Polynomial coefficients. For n=6, the Laguerre Matrix is: ...

10 years 前

已解决


Divide the Least Common Multiple by the Greatest Common Divisor of two numbers
Divide the Least Common Multiple by the Greatest Common Divisor of two numbers. For example, for x=12345 and y=54321, the answer...

10 years 前

已解决


0, 2, 0, -2, 0, 2, 0, -2, ...
Generate the first n terms of a periodic sequence defined as f(x) = 0, 2, 0, -2, 0, 2, 0, -2, ..., for x = 1, 2, 3, 4, 5, 6...

10 years 前

已解决


Replicate and Tile an Array
Replicate and tile an array. Example A = [1 2 3; 4 5 6; 7 8 9] B = Epli_and_Tile(A,1,2) B = [ 1 2 3 1...

10 years 前

已解决


Arc length of points interpolation
Given a n by m matrix representing m vectors in n dimensions. Calculate the <https://en.wikipedia.org/wiki/Arc_length arc length...

10 years 前

已解决


surrounded centroid
create a [n*n] matrix. n must be odd number. its centroid is n which is surrounded by n-1. example: surround(5)= 1 2 ...

10 years 前

已解决


"Bubblegum, Bubblegum, in a dish; How many pieces do you wish?"
The child's game "bubblegum, bubblegum, in a dish; how many pieces do you wish?" is a way of eliminating players until a single ...

10 years 前

已解决


Sort rows of a matrix
Sort rows of matrix A in an ascending order according to the last column Example input: A = [1 2 3;7 8 9;4 5 6]; Exam...

10 years 前

已解决


Create cotangent function out of sine.
Please, don't use cos, tan, cot matlab functions.

10 years 前

已解决


4 Digit Sequence Repetitions
Given a 4 digit integer, a sequence can be created such that the next digit in the sequence is the ones digit from the sum of th...

10 years 前

已解决


Calculate the centroid of a triangle
Info: https://en.wikipedia.org/wiki/Centroid Example Input: x = [0 0 1]; % x-coordinate y = [0 1 0]; % y-coordinat...

10 years 前

已解决


Euclidean distance from a point to a polynomial
A not uncommon problem in the area of computational geometry is to find the closest point to a straight line from a given point,...

10 years 前

已解决


Find the sides of an isosceles triangle when given its area and height to its base.
Find the sides of an isosceles triangle when given its area and height to its base. Example S=12, h=4, result will be [5 5 6]...

10 years 前

已解决


Find Pseudo-Cyclic Number
A cyclic number is an integer in which cyclic permutations of the digits are successive multiples of the number https://en.wikip...

10 years 前

已解决


Avengers Assemble!
Given matrix with so many zeroes, trim those zeroes and output a matrix joining all nnz elements Example: input = [0 0 0 0 0...

10 years 前

加载更多