A résolu


Diagonal Cross Mandala
Generate an N×N matrix with diagonals highlighted to form an artistic X-shaped mandala pattern. e.g. N = 5; 1 0 0...

16 jours il y a

A résolu


Find record values in a sequence
Write a function to find the record values in a sequence—that is, the largest values seen since the start. For example, if the s...

16 jours il y a

A résolu


Electrical Diode Current Calculation
In engineering, there is not always a single equation that describes a phenomenon accurately enough to be applied in all instanc...

18 jours il y a

A résolu


[Mảng 1 Chiều Cơ Bản]. Bài 2. Trung bình cộng nguyên tố
Cho mảng số nguyên A[] gồm N phần tử, nhiệm vụ của bạn là tính trung bình cộng của các số là số nguyên tố trong dãy. Dữ liệu đảm...

18 jours il y a

A résolu


Plus Cross Mandala
Create a symmetrical plus (+) shaped pattern centered in an N×N matrix.

21 jours il y a

A résolu


[Mảng 1 Chiều Cơ Bản]. Bài 4. Lớn hơn, nhỏ hơn
Cho mảng số nguyên A[] gồm N phần tử và số nguyên X , hãy đếm xem trong mảng có bao nhiêu số lớn hơn X và bao nhiêu số nhỏ hơn X...

21 jours il y a

A résolu


[Mảng 1 Chiều Cơ Bản]. Bài 3. Số nhỏ nhất
Cho mảng số nguyên A[] gồm N phần tử, hãy đếm xem trong mảng của bạn có bao nhiêu số có cùng giá trị nhỏ nhất. Ví dụ mảng A = {1...

21 jours il y a

A résolu


Two Sum
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. You m...

21 jours il y a

A résolu


[Mảng 1 Chiều Cơ Bản]. Bài 1. Chẵn lẻ
Cho mảng số nguyên A[] gồm N phần tử, nhiệm vụ của bạn là đếm xem trong mảng có bao nhiêu số chẵn, bao nhiêu số lẻ, tổng các phầ...

21 jours il y a

A résolu


AK Sorting according to given order
Conventional ascending order of one digit number is [ 0, 1, 2, ......9]. Now this order is changed and stored in vector a. For e...

24 jours il y a

A résolu


Do they touch?
The center and radius of two circles are given. Determine whether they touch.

24 jours il y a

A résolu


Is there a GPU Device?
Return true if there is a supported GPU device available on the Cody computer.

24 jours il y a

A résolu


expand intervals vol.2
Similar to problem <http://www.mathworks.co.uk/matlabcentral/cody/problems/2528 2528>. This is a more general case, when bounds ...

29 jours il y a

A résolu


Wheat on a chessboard pt 1
If a chessboard were to have wheat placed upon each square such that one grain were placed on the first square and each successi...

29 jours il y a

A résolu


Check transmitted data follow even parity (True or false)
Check transmitted data follow even parity (True or false) <http://en.wikipedia.org/wiki/Parity_bit/ Parity Bit> Say, '010...

environ un mois il y a

A résolu


Find nth triangular number.
Calculate the triangular number of given integer n.

environ un mois il y a

A résolu


Hofstadter H sequence
The Hofstadter H sequence is defined as follows: The first elements of the sequence are 0, 1, 1, 2, 3, 4, 4, 5, 5, 6. Write ...

environ un mois il y a

A résolu


Convert integer to base26 using letters
Write a function that converts a decimal integer to base26 using the letters of the english alphabet, i.e. 0->'a', 1->'b', 2->'c...

environ un mois il y a

A résolu


Find prime number couples
Given a vector a, which will always contain at least one pair of prime numbers couple, return a matrix called 'couple' in which ...

environ 2 mois il y a

A résolu


Tricky timing
Write a function that takes between 0.5 seconds and 0.6 seconds to run.

environ 2 mois il y a

A résolu


Split array into pieces according to corresponding array
An array x of length n has values 1...m with each value appearing at least once. The values are sorted (n>=m). A second...

environ 2 mois il y a

A résolu


Find smallest integer type to accommodate your number
MATLAB supports 1-, 2-, 4-, and 8-byte storage for integer data. Find the smallest integer type to accomodate a scalar integer. ...

environ 2 mois il y a

A résolu


Solve for factorial of X
It gives you the number x, and set y equal to x factorial. Ex. There are 52 cards in a deck, each specific order of all 52 car...

environ 2 mois il y a

A résolu


Monty Python and the Holy Grail: Crossing the Bridge of Death
To cross the Bridge of Death, your function must return the numerical value for the airspeed velocity of an unladen swallow

environ 2 mois il y a

A résolu


Pascal's Triangle
Create a matrix of size N x N containing a Pascal's Triangle that starts from the upper left corner according to the test cases ...

environ 2 mois il y a

A résolu


Easy Sequences 2: Trigonometric function with integral input and output
The function 'F', defined as: , will always return an integer if the input is a natural number (in radian...

2 mois il y a

A résolu


Find longest run
Write a function longest_run that takes as input an array of 0's and 1's and outputs the length and index of the longest consecu...

2 mois il y a

A résolu


Sum of Elements of a matrix
It sums the elemets of a 2x2 matrix

2 mois il y a

A résolu


Einsteinium-253 decay
Radioactive Einsteinium-253 has a half-life of 1,768,608 seconds. Given 1000mg of Einsteinium-253 at t=0 days, how much is lef...

2 mois il y a

A résolu


Create formatted value string Cell array of a vector
This Challenge is to create a cell array that contains strings of vector components in a given format. c=vector2formattedstri...

2 mois il y a

Charger plus