Solved


Congruent
Given two numbers, check whether they are congruent to each other or not for a particular value N.

1 year ago

Solved


Sort Non-zeros
Consider 0s in a vector creates a break-point. sort all the sub-arrays created by those break points. For example, a = [3, 4, 1...

1 year ago

Solved


Product of Array
Given an array of numbers. Get the product of the array.

1 year ago

Solved


Remove the Zero
Given an array n, remove all zeros

1 year ago

Solved


Area under the curve
Compute area under the curve specified by points stored in y, where y is in range (0,inf) and x time step is 1. note: please r...

1 year ago

Solved


String count
given a string 'str', count the number of the followings - * letters * digits * white space * capital letters * smal...

1 year ago

Solved


Find the sequence
Find the nth number of a sequence. Check the test suite to determine the sequence. * hint: it is closely related to familiar ...

1 year ago

Solved


One-hot encoding

1 year ago

Solved


Fun with matrix
Design a sample matrix as given in the test cases

1 year ago

Solved


Rotate a matrix without using rot90
rotate the input square matrix by certain degrees (e.g. 270 or 450 etc.) without using rot90 or flip function. its an extension...

1 year ago

Solved


Gapful numbers
If a number is divisible by the number formed by the first and last digit of that number then it is defined as a gapful number. ...

1 year ago

Solved


Tribonacci Sequence
Generate the tribonacci sequence upto n

1 year ago

Solved


generate the matrix
given 3 inputs e.g [2,3,4] -- generate a matrix like below -- [2 2 0 0 0 0 0 0 0; 2 2 0 0 0 0 0 0 0; 0 0 3 3 3 0 0 0 0; 0 0...

1 year ago

Solved


Greater than before
Given an array of integers, write a function that returns elements that are greater than the one before them. For instance, ...

1 year ago

Solved


Unique rows
A matrix is given as the input. Remove any duplicate rows from the matrix. keep the first occurrence.

1 year ago

Solved


First Duplicate
Given an array of integers, return the first duplicate — i.e., the element that appears more than once and whose second appearan...

1 year ago

Solved


ZigZag - 02
Given a matrix, return the elements that are on the Z form of the matrix. For example - a=[1,2,3,4,5; 6,7,8,9,1; 1...

1 year ago

Solved


Time and Variable mapping and matching
There is a 6X5 cell array where * 1st column represents time values * 2nd and 3rd column represent variables and their value...

1 year ago

Solved


No Twins?
Write a function that accepts as input a vector and returns the same vector, but retaining only the first occurrence of an eleme...

1 year ago

Solved


Find the elements of a matrix according to a defined property.
From A = [5,2,3] and B = [1,2,3,4,5,6,7,8,9,10] produce a vector C where : C(1) is the sum of the first A(1) elements of B, ...

1 year ago

Solved


Alphabetize by last name
Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...

1 year ago

Solved


Large Sum (inspired by Project Euler 13)
Your function will be provided an arbitrary number of numbers of arbitrary sizes as a cell array of strings. Some numbers will b...

1 year ago

Solved


Data decompression
A chunk of data is to be 'decompressed'. Input: * compressed: a row vector of uint8 values. This is the compressed data. ...

1 year ago

Solved


Converting Decimal to Binary
Given a decimal number that may include a fractional component, convert it into binary representation. The numbers you are given...

1 year ago

Solved


Moving average (variable kernel length)
Find the moving average in a vector. The kernel length is a variable. For example x = 1:10 kernel_length = 2 would r...

1 year ago

Solved


Remove DC
Input x is the sampled signal vector, may have both AC and DC components. Output y should not contain any DC component. Examp...

1 year ago

Solved


Is this number Munchhausen?
In this problem, simply return 1 if a supplied number is Munchhausen or 0 if not. Example 153 is narcissistic but not a Munchh...

1 year ago

Solved


Convert Two Character String into a Binary Vector
Given a string "XOXXO" convert it into a binary vector. [1 0 1 1 0] Paul Berglund implemented an optimal method in <http://ww...

1 year ago

Solved


Now 20% off!
Furloughs are hitting government workers this year. To commemorate getting one unpaid day off each week until the end of Septem...

1 year ago

Solved


Rolling maximums above a threshold
You are given either a vector or a 2-D matrix M and a threshold value of t. Write a script that will calculate how many times t...

1 year ago

Load more