Solved


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

2 days ago

Solved


Pascal's Pyramid - A Variation with an Arial View
Let's create a matrix of size N x N containing a Pascal's Triangle in each quadrant that diverges from the centre to form an ari...

2 days ago

Solved


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

2 days ago

Solved


Convert a diagonal representation of a matrix element to linear index or subscripts
Elements in matrices in MATLAB can be retrieved by linear index or subscripts. For example, the 1 in the matrix below has a line...

2 days ago

Solved


Determine whether a number is a repfigit number
A sequence of numbers is constructed from a number with the following steps: List the digits of . Compute the ()st term as t...

2 days ago

Solved


Extract numbers using a decaying sieve
The Sieve of Eratosthenes is one method of determining primes. Starting with 2, one keeps 2 and removes 2x2, 3x2, 4x2, etc. Then...

2 days ago

Solved


FEN Chess Notation
Note: This problem is the reverse, or complement, of Problem 61155 - FEN to Chess Board. Given an 8-by-8 character matrix repre...

2 days ago

Solved


Calculating Swimming Stroke Index (SI)
In competitive swimming, speed () is only one part of the equation. High efficiency is defined by moving fast while maintaining ...

2 days ago

Solved


Apply the planing transform to natural numbers
Claude Lenormand’s planing (or raboter, in French) transform removes one element from each run in a sequence; that is, imagine a...

2 days ago

Solved


Addition II
find a+b+c+d

2 days ago

Solved


X-intercepts of a quadratic.
Find the y value of the quadratic of the function at a point x.

2 days ago

Solved


Write a string
The answer should be a string that is the value: "I like apples!" (Ignore the quotation marks, just write what is inside the ...

2 days ago

Solved


Point on a line
Find the slope of the straight line between the points a and b. Then find y at x=20.

2 days ago

Solved


Division
Divide a by b.

2 days ago

Solved


Subtraction
Subtract a from b.

2 days ago

Solved


Squares
Find the square of x.

2 days ago

Solved


Multiplication
Multiply a and b.

2 days ago

Solved


Addition
Add together the values of a and b.

2 days ago

Solved


Sum of even numbers in a vector
Write a function that takes a vector of numbers and returns the sum of all the even numbers in the vector.

2 days ago

Solved


Linearly Spaced Array
Create a linearly spaced array from 0 to x consisting of y elements.

2 days ago

Solved


Mach Number Calculator
Create a solver which converts a speed in km/s to a Mach Number Round to 2 decimal places Requires: Mach Number Formula (ea...

2 days ago

Solved


Multiplying the Sums of Two Arrays
Get two arrays, add the values within the array up, and then multiply the two total values. [2,3]*[3,6] 5*18 90

2 days ago

Solved


Escape from Planet ....
Given a Planets mass M, and raduis r. Calculate the surface escape velocity and the escape velocity at height h. and the diff...

2 days ago

Solved


Center-of-Mass Index of a Vector
Given a numeric vector x, treat each element x(i) as a mass located at index i. Compute the center-of-mass index idx = sum(i *...

2 days ago

Solved


First Unique Character
Given a character vector s, return the first character that appears exactly once in s. If every character repeats at least once...

2 days ago

Solved


Upper vs Lower Triangle
Create an n × n matrix A such that: Elements strictly above the main diagonal are 1 Elements strictly below the main diagonal ...

2 days ago

Solved


Odd Run Sums
Given a row vector x of integers, find every maximal run of consecutive odd numbers and return a row vector containing the sum o...

2 days ago

Solved


Mirror Pair Mean
Given a row or column vector v, create a vector y of the same size where each element is replaced by the average of itself and i...

2 days ago

Solved


Find the Nth number in the 8-sequence
Find the Nth number in the 8-sequence. 8, 16, 24, 32, 48, 56, 64, 72, 88, ... Hint: Refer test suites

2 days ago

Solved


Find the Nth number in the 7-sequence
Find the Nth number in the 7-sequence. 7, 14, 21, 28, 35, 42, 49, 56, 63, 77, 84, ... Hint: Refer test suites

2 days ago

Load more