Community Profile

Contact

Top 1% contributor

I'm working on configuring our model to run in Rapid Accelerator mode with the "RapidAcceleratorUpToDateCheck" set to "off", fol...

1121 views

Posted 5 years ago

There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

Solve this!

1 year ago

Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

Given two strings s1 and s2, create a new string s3 which is as short as possible and contains both strings. If s1 = [1 2...

2 years ago

Given an input cell array of strings s, pick out the second column and turn it into a row vector of data. Missing data will be i...

<http://en.wikipedia.org/wiki/Connect_Four Connect Four> is a game where you try to get four pieces in a row. For this problem, ...

A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...

Given a 3D matrix, A, find the largest value. E.g. >> A = 1:9; >> A=reshape(A,[3 1 3]); >> islargest(A) ans = 9

Create a vector of length N for an integer of N digits. x=123045; x_vec=[1 2 3 0 4 5]; I happened upon a trick to do ...

Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...

Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

Replace NaNs with the number that appears to its left in the row. If there are more than one consecutive NaNs, they should all ...

Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

Given a handle fh to a function which takes a scalar input and returns a scalar output and an integer n >= 1, return a handle f...

Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

Load more