Gelöst


Find the logic and return the nth number
given a sequence of numbers arranged in the following order: A=0,1,3,4,9,10,12,13,27,28,30,31,36,37,...... Write a function th...

21 Tage vor

Gelöst


Find the logic and return the nth number (plus)
This problem is the harder version of Problem 61015 given a sequence of numbers arranged in the following order: A=0,1,3,4,9,1...

21 Tage vor

Gelöst


Find the index of nth maximum of a row vector of real numbers
Given a vector of real numbers x, find the index idx of _n_ th maximum value. If nth maximum occurs more than once, return the i...

21 Tage vor

Gelöst


Find the nth composite number.
Everyone heard about the nth prime number. Let's try to find out the nth composite. For example , 1 is the first composite, 10 i...

21 Tage vor

Gelöst


Container With Most Water
You are given an integer array height . There are vertical lines drawn such that the two endpoints of the ith line are (i, 1) an...

22 Tage vor

Gelöst


[Mảng 1 Chiều Cơ Bản]. Bài 5. In phần tử
Cho mảng số nguyên A[] gồm N phần tử, nhiệm vụ của bạn là in ra các phần tử là số chẵn ở chỉ số chẵn, nếu mảng không tồn tại phầ...

22 Tage vor

Gelöst


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

22 Tage vor

Gelöst


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

22 Tage vor

Gelöst


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

22 Tage vor

Gelöst


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

22 Tage vor

Gelöst


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

22 Tage vor

Gelöst


Index one element in each vector of an array along a given dimension
Functions like min and max can return in their second output argument the index of the element in each vector along a particular...

etwa ein Monat vor

Gelöst


Finding neighbors of [-1:1] in a matrix....
Hello All! Well I found this one fun to figure out, all you have to do is make a matrix of 1's or 0's (true or false) that sh...

etwa ein Monat vor

Gelöst


Index of a Rational number
The set of real numbers are infinite. They are so many that real numbers can't even be enumerated. However, unlike real numbers ...

etwa ein Monat vor

Gelöst


Three...is a magic number.
Yes it is... It's a magic number... To help you get rid of that earworm, here's a new Cody problem. You are given a squar...

etwa ein Monat vor

Gelöst


Polynomial division
Divide a polynomial u by polynomial v and return the quotients only. Example: u = x^4+3*x^3+5*x+3 v = x^2+1 Answer: ...

etwa ein Monat vor

Gelöst


Periodic Table II 101.
Given the symbol of an element, return its atomic number. This is the continuation of <http://www.mathworks.com/matlabcentral/co...

etwa ein Monat vor

Gelöst


Change the sign
Given a matrix x, return one with each diagonal element replaced by its absolute value and the largest element in absolute value...

etwa ein Monat vor

Gelöst


Periodic Table 101.
Given the atomic number (z), answer the symbol for that particular element of the <http://en.wikipedia.org/wiki/Periodic_table/ ...

etwa ein Monat vor

Gelöst


GJam: 2013 China Event: Cannon Angle
This Challenge is derived from <http://code.google.com/codejam/contest/2933486/dashboard#s=p1 GJam 2013 China Captain Hammer>. T...

etwa ein Monat vor

Gelöst


Make a diamond
Given n, odd number > 1, return n by n matrix consist of "null" and "*" characters arranged like a diamond. No toolbox funct...

etwa ein Monat vor

Gelöst


Tent matrix
Create an n x n matrix that resembles one kind of tent. The variable n is provided to the function and will be an odd number. As...

etwa ein Monat vor

Gelöst


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

etwa ein Monat vor

Gelöst


create a square matrix
create a [n*n] matrix. example: mat(4)= [ 1 4 9 16 4 4 9 16 9 9 ...

etwa ein Monat vor

Gelöst


Generate the sum of Squares of the given number
|P(n) = 1^2 + 2^2 + ... + n^2| |P(1) = 1| |P(2) = 1 + 4 = 5;| |P(3) = 5 + 9 = 14;| |P(4) = 14 + 16 = 30;|

etwa ein Monat vor

Gelöst


Find the jerk
No, it's not the author of this problem... Jerk is the rate of change in acceleration over time of an object. So, if given t...

etwa 2 Monate vor

Gelöst


Bernoulli's Equation
Bernoulli's equation states that for an incompressible fluid the following summation is constant across the flow: v^2/2 + g*z + ...

etwa 2 Monate vor

Gelöst


center of mass
R is a given matrix with size [n,2]. R(i,:) is interpreted as the 2D-position of a mass point with mass i. Calculate the center ...

etwa 2 Monate vor

Gelöst


Multiplication
Multiply a and b.

etwa 2 Monate vor

Gelöst


Squares
Find the square of x.

etwa 2 Monate vor

Mehr laden