Solved

Pad zero between every adjacent values of the vector.

you are given a vector x. you have to make an output vector y with zeros padded between every adjacent values of x. e.g x: ...

3 months ago

Solved

Get chain of consecutive characters

Write a function that will output a chain of consecutive characters, given 2 letters as input. It has to work backwards too. Exa...

3 months ago

Solved

Matrix Manipulation

Given an m*n matrix, see if a matrix contains any 0s in any row. if it contains 0 anywhere in any particular row, delete that ro...

3 months ago

Solved

Find the binary code

Given a sinusoidal signal, create a function that returns the binary code of a quantized value. The function takes the bit lengt...

3 months ago

Solved

Pascal's triangle

<https://en.wikipedia.org/wiki/Pascal%27s_triangle> if the order is: x = 3; the output will be: output = [0 0 0 1 0 0 ...

3 months ago

Solved

Write a function to calculate step size delta if bits per sample and input range is given for quantization.

numBit = bits per sample; range = input max value - min value; delta = step size; l = number of levels;

3 months ago

Solved

Brain Teaser Solver

Write an algorithm to solve this brain teaser: You have a square that is broken into four triangles, the area of three of tho...

3 months ago

Solved

adding huge numbers

Write function called huge_add that adds together two positive integers of any length specified as char vectors using decimal n...

3 months ago

Submitted

Game-2048-AI-Solver

Implementation of Game 2048 with an Artificial Intelligence Solver written in JAVA.

3 months ago | 2 downloads |

Solved

Fill the matrix - 1

Input is a column vector and n. n columns will be added to the left of the input column. The first value of the row is the s...

3 months ago

Solved

Fill the Matrix - 2

Input is a column vector and n. n columns will be added to the left of the input column. The first value of the row is the me...

3 months ago

Solved

Airline Ticket Mod7 Checksum

There are 13 digits in an airline ticket number. If an airline ticket number is valid, the 13th digit should be the remainder of...

3 months ago

Solved

Unusual Concatenations

The sum of the squares of certain unusual integers is equal to the concatenation of their individual digits. For example: ...

3 months ago

Solved

Whole Number Un-Concatenator

Write a function that accepts an integer and an index digit and returns a vector containing two integers which are the leading a...

3 months ago

Solved

Whole Number Concatenator

Write a function that concatenates whole numbers. For example: numcat(111,222) should return 111222 numcat(1,2,3,4,5) s...

3 months ago

Solved

Dudeney Numbers: Numbers which are the cube of their decimal sum

From Wikipedia: _A Dudeney number is a positive integer that is a perfect cube such that the sum of its decimal digits is equa...

3 months ago

Solved

Factorions: Numbers that equal the sum of the factorials of their digits

From Wikipedia: _A factorion is a natural number that equals the sum of the factorials of its decimal digits_ For example: ...

3 months ago

Solved

Fractal: area and perimeter of Koch snowflake

Starting from an equilateral triangle with side 's', what is the area and perimeter of Koch snowflake at n'th recursive iteratio...

3 months ago

Solved

Number of paths on a n-dimensional grid

This problem is inspired by <https://www.mathworks.com/matlabcentral/cody/problems/1483-number-of-paths-on-a-grid> and <https:/...

3 months ago

Solved

Number of paths on a 3d grid

This problem is inspired by <https://www.mathworks.com/matlabcentral/cody/problems/1483-number-of-paths-on-a-grid>, which you mi...

3 months ago

Solved

Number of paths on a grid

Consider a grid formed by n vertices vertically down, and m vertices horizontally right. Your starting point is at the top lef...

3 months ago

Solved

The last non-zero digit of a factorial

For given positive integer n, what is the last non-zero digit of n!? Example: factorial(11) = 39916800 Last non-zero d...

3 months ago

Solved

The number of trailing zero digit of a factorial

For given positive integer n, take factorial of that number. How many trailing zeros does it have? Example: factorial(11) = 3...

3 months ago

Solved

Number of even divisors of a given number

Given a Number n, return the number of its even divisors without listing them. example: n=14 ; EvenDivisors={2,14} ; y=2 ...

3 months ago

Solved

Smallest n, for n! to have m trailing zero digits

For given positive integer n, its factorial often has many trailing zeros, in other words many factors of 10s. In order for n! t...

3 months ago

Solved

number of groups

In a classroom, *n* students work on a special project and the other students work in groups of five. If there are 18 students i...

3 months ago

Solved

Determinants

Given a square matrix(A), find the determinant(d). For example: A = [1,3;4,5] d = 1*5-4*3 = -7

3 months ago

Solved

Matrix game: Winner takes all

Given a matrix A, return a new matrix of the same size in which the biggest element of each column in A takes 1, and 0 for all t...

3 months ago

Solved

another bullseye

create matrix like below -- for x=2, y=[1 1 1 1 1; 1 2 2 2 1; 1 2 3 2...

3 months ago

Solved

Simple Decoder Ring

The stereotypical _decoder ring_ is remembered as a cereal box prize from the 1950s. Kids learned about cryptography by startin...

3 months ago