Solved

Frugal number

check whether n is a frugal number * a frugal number is a natural number in a given number base that has more digits than the...

7 giorni ago

Solved

Pell numbers

Find the nth pell number <https://en.wikipedia.org/wiki/Pell_number>

7 giorni ago

Solved

Fangs of pseudo-vampire number

given a number, find all the fangs of that number. A pseudo-vampire number can have multiple of fangs. The output should be a...

7 giorni ago

Solved

Pseudo-vampire number

refer to <https://en.wikipedia.org/wiki/Vampire_number> Given a number x, determine whether it is a pseudo-vampire number. ...

7 giorni ago

Solved

De-primed

Write a function that will multiply every prime number in the array or matrix by two, leaving all other numbers the same, and re...

8 giorni ago

Solved

Evened up (or not)

You will be provided with an array or matrix that contains various numbers, in addition to an evening variable, e, set to 1 or 0...

8 giorni ago

Solved

Big numbers, least significant digits

Given two numbers, x and n, return the last d digits of the number that is calculated by x^n. In all cases, d will be the number...

8 giorni ago

Solved

Binary Neighbourhood

Given a natural number reorder its binary form to create another number, closest to the given one. Examples: * 1 gives 2, ...

8 giorni ago

Solved

Convert to Binary Coded Decimal

Convert from decimal representation to <http://en.wikipedia.org/wiki/Binary-coded_decimal Binary Code Decimal> (or BCD) represen...

8 giorni ago

Solved

Find out the Gray Code for a Given Binary Number

Find out <http://en.wikipedia.org/wiki/Gray_code Gray Code> for a given binary number Example Binary input 1000 Gray ...

8 giorni ago

Solved

Consecutive Equation Times (of the day)

Many times throughout the day can represent mathematical equations. In this problem, we focus on the largest consecutive run of ...

8 giorni ago

Solved

Equation Times (of the day)

Many times throughout the day can represent mathematical equations. In this problem, we focus on times that include the four bas...

8 giorni ago

Solved

Power Times (of the day)

Many times throughout the day can represent mathematical equations. In this problem, we focus on times that represent powers. Fo...

8 giorni ago

Solved

Bit calculation

Give me the count of numbers from 1 to n having their last two bits as 0. For example function y = ret_count(4) y = x...

8 giorni ago

Solved

Mysterious digits operation (easy)

What is this digit operation? 0 -> 0 1 -> 9 121 -> 9 44 -> 6 15 -> 5 1243 -> 7 ...

8 giorni ago

Solved

Matrix Construction I

Given n, construct a matrix as shown in the example below. Example For n=8, the output should look like this: 1 2 3 4 ...

9 giorni ago

Solved

Create a block diagonal matrix

A block diagonal matrix is a square matrix that can be written as A = [a 0 0 0 0 b 0 0 0 0 c 0 ...

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

9 giorni ago

Solved

The Matrix Construction

Given two input ,first one is CN (Column Number), Second one is Dim Can you produce such a matrix for example CN=6; Dim=2 ...

9 giorni ago

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

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

9 giorni ago

Solved

Generate this matrix

Generate the following matrix. n = 2; out = [-4 -3 -2 -1 0 -3 -2 -1 0 1 -...

9 giorni ago

Solved

Rainbow matrix

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

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

9 giorni ago

Solved

Triangular matrices in 3D array

Given a 3D numeric array _x_, return an array _y_ of the same size in which all entries to the right of the main diagonal are ze...

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

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

9 giorni ago

Solved

Matrix of Multiplication Facts

This is James's daughter again, sneaking into his Cody account. Thanks to your help in my math class last year, I did great! B...

12 giorni ago

Solved

Hankelize a matrix

Similar to <http://www.mathworks.com/matlabcentral/cody/problems/42501-toeplitize-a-matrix Problem 42501. Toeplitize a matrix>, ...

12 giorni ago

Solved

Toeplitize a matrix

Similar to <http://www.mathworks.com/matlabcentral/cody/problems/3094-hankelize-a-matrix Problem 3094. Hankelize a matrix>, now ...

12 giorni ago