Solved


Diagonal of a Spiral Matrix
Write a function that will return same output as diag(spiral(n)). The only exception is that spiral and diag functions are not a...

5 months ago

Solved


Generate this matrix
For a given odd integer n, generate a matrix as follows: Input: n = 5; Output: [ 2 1 0 0 0 1 ...

5 months ago

Solved


Numbers spiral diagonals (Part 1)
Inspired by Project Euler n°28 et 58. A n x n spiral matrix is obtained by starting with the number 1 and moving to the right...

5 months ago

Solved


Calendar Matrix
Return a calendar matrix for the given values of month and year. Assume that Sunday is the first day of the week. The resulting ...

5 months ago

Solved


Pascal's pyramid
In Pascal's triangle each number is the sum of the two nearest numbers in the line above: 1 1 1 ...

5 months ago

Solved


BULLSEYE Part 2: Reference Problem 18 BULLSEYE
Given n (always odd), return output a that has concentric rings of the 1s and 0s around the center point. Examples: Input ...

5 months ago

Solved


Rainbow matrix
Create a "rainbow matrix" as described in the following examples Input = 3 Output = [ 1 2 3 2 3 2 ...

5 months ago

Solved


Numbers spiral diagonals (Part 2)
Inspired by Project Euler n°28 and 58. A n x n spiral matrix is obtained by starting with the number 1 and moving to the right ...

5 months ago

Solved


Toeplitz Matrix
For a given square matrix of order n-by-n check whether this is a Toeplitz matrix or not. Return true if it is.

5 months ago

Solved


ZigZag matrix with reflected format
ZigZag MATRIX with REFLECTED format. We have only input x. We have to create a matrix in the following pattern. input n=5...

5 months ago

Solved


Total energy

5 months ago

Solved


Potential energy calculation

5 months ago

Solved


Kinetic energy calculation

5 months ago

Solved


Laws of motion 1

5 months ago

Solved


Laws of motion 2

5 months ago

Solved


Laws of motion 3

5 months ago

Solved


Laws of motion 4
Given the initial velocity 'u', final velocity 'v' and acceleration 'a', find the distance travelled.

5 months ago

Solved


Laws of motion 5
Calculate the force is u are given mass and acceleration.

5 months ago

Solved


Create an n-by-n null matrix and fill with ones certain positions
The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...

5 months ago

Solved


Is A the inverse of B?
Given a matrix A and a matrix B, is A the inverse of B? >>A=[2,4;3,5]; >>B=[-2.5,2;1.5,-1]; >>isInverse...

5 months ago

Solved


Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

5 months ago

Solved


Find the max element of the array
Find the max element of the array

5 months ago

Solved


Calculate the average value of the elements in the array
Calculate the average value of the elements in the array

5 months ago

Solved


to the 2 all elements
to the 2 all elements

5 months ago

Solved


the average value of the elements
Calculate the average value of the elements in the array

5 months ago

Solved


Double all elements in the array
Duplicate all elements in the array

5 months ago

Solved


calculate the length of matrix
input 1 array, calculate the length

5 months ago

Solved


Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

5 months ago

Solved


Parcel Routing
Given a matrix that represent the distance along highways between major cities numbered 1 to _N_, provide the path and shortest ...

5 months ago

Solved


Graph Algorithms 3: Number of Connected Components
Given an adjacency matrix of a simple undirected graph, find the number of connected components.

5 months ago

Load more