Community Profile

Contact

Top 1% contributor

*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

Solve this!

2 years ago

Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

Given a list of pairs, find the orientation they should be placed in a line, such that the sum of the absolute values of the dif...

Imagine a square tile with four numbers on it, one on each edge. We will call these edges north, east, south, and west. If th...

You will be given a cell array of nx2 matrices. Choose one row from each matrix. These are the ordered pairs that will be plac...

You have a stack of tiles to put onto an array-like playing board. Each tile has a number (always an integer), and the board var...

Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

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

Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

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.

Check if sorted. Example: Input x = [1 2 0] Output y is 0

Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

Given the vector a, find the longest run of consecutive numbers that can be evenly divided by the same number d where d > 1. ...

Given a matrix A that represents the state of <http://en.wikipedia.org/wiki/Conway's_Game_of_Life Conway's game of Life> at one ...

Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

Given a list of US states, remove all the states that end with the letter A. Example: Input s1 = 'Alabama Montana Nebras...

An internet meme from 2003 (read more <http://www.snopes.com/language/apocryph/cambridge.asp here>) asserted that readers are re...

Given a list of US states, remove all the states that start with the letter N. If s1 = 'Alabama Montana Nebraska Vermont Ne...

Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

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

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

Load more