已解决


Form a square matrix from four square sub-matrices
Create a square matrix, y, from 4 square sub-matrices that will be constructed (x1, x2, x3, x4): y = [x1 x2; x3 x4]; ...

9 years 前

已解决


How long is the longest prime diagonal?
Stanislaw Ulam once observed that if the counting numbers are <http://en.wikipedia.org/wiki/Ulam_spiral arranged in a spiral>, t...

9 years 前

已解决


Eight Queens Solution Checker
Write a function to verify whether an arrangement of queens on a chessboard is a valid solution to the classic <http://en.wikipe...

9 years 前

已解决


N-Queens Checker
Picture a chessboard populated with a number of queens (i.e. pieces that can move like a queen in chess). The board is a matrix,...

9 years 前

已解决


Project Euler: Problem 4, Palindromic numbers
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 ...

9 years 前

已解决


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

9 years 前

已解决


Determine if input is a perfect number
A <http://en.wikipedia.org/wiki/Perfect_number/ perfect number> occurs whent the sum of all divisors of a positive integer, exce...

9 years 前

已解决


Find Pseudo-Cyclic Number
A cyclic number is an integer in which cyclic permutations of the digits are successive multiples of the number https://en.wikip...

9 years 前

已解决


Fangs of a vampire number
A <http://en.wikipedia.org/wiki/Vampire_number vampire number> is a number v that is the product of two numbers x and y such tha...

9 years 前

已解决


Check if two matrices are permutations of each other
Your function should return true for the elements of one matrix is the permutation of the other matrix: x = [1 2 3; 4 5 6; ...

9 years 前

已解决


Divide elements by sum of elements
In this problem, I ask you to write a function which will divide the elements of each column by the sum of the elements of the s...

9 years 前

已解决


index of n^2 in magic(n)
input=5 magic matrix 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 ...

9 years 前

已解决


Permute diagonal and antidiagonal
Permute diagonal and antidiagonal For example [1 2 3;4 5 6;7 8 9] -> [3 2 1;4 5 6;9 8 7] WITHOUT diag function (and variable n...

9 years 前

已解决


Find the maximum two numbers of every column of a matrix
Find the maximum two numbers of every column of a matrix. Example: If we input a matrix A = [ 1 2 4 6 0 3 ...

9 years 前

已解决


row-th maximum row elements
Input a is a square matrix of size n*n. Output vector v is of size 1*n. The ith element of output v is the ith largest element o...

9 years 前

已解决


Create an m x n array consisting only of an input value.
Create an array with m rows and n columns wherein all entries are assigned the input value x.

9 years 前

已解决


Pascal's Matrix
Given an integer n &ge; 0, generate the ( _n_+1) &times; ( _n_+1) lower triangular <http://en.wikipedia.org/wiki/Pascal_matrix P...

9 years 前

已解决


Find the product of the positive elements above the main diagonal.
Example Input A=[1 2; -3 0] Output 2

9 years 前

已解决


Numbers at bit-boundary
Find if a number is on or below the bit-boundary, as defined below. Examples 7,9 straddle the bit-boundary at 2^3 as do 31...

9 years 前

已解决


Convert decimal to binary and then generate the minimum binary it can with jumbling
input is 10 --> 1010 output should be 3 --> 0011 input 23 --> 10111 output should be 15 --> 01111

9 years 前

已解决


X plus binary inverted x
Given a n-bits number x, what is the sum of x to the binary inverted version of x? (this might be more simple than you think :-)...

9 years 前

已解决


User defined nextpow function
Create a function which will take 2 arguments as n and x, and return y, where, n^y >= abs(x). [ Similar to builtin "nextpow2" fu...

9 years 前

已解决


Look and say Conway's sequence
In mathematics, the look-and-say sequence is the sequence of integers beginning as follows: 1, 11, 21, 1211, 111221, 312211, ...

9 years 前

已解决


Index of a Rational number
The set of real numbers are infinite. They are so many that real numbers can't even be enumerated. However, unlike real numbers ...

9 years 前

已解决


Construct an index vector from two input vectors in vectorized fashion
Create an index vector defined by two input vectors, one defining the beginnings of one or more index ranges, and the other defi...

9 years 前

已解决


Numbers with prime factors 2, 3 and 5.
Make a function which takes one positive integer n and returns a matrix with the numbers of the form (2^i)*(3^j)*(5^k) which are...

9 years 前

已解决


Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

9 years 前

已解决


Pandigital Factors (Based on Euler 491)
A Pandigital Number is a number containing all of the digits from 0-9 inclusive, with the added stipulation that it does not hav...

9 years 前

已解决


It's going down. We're finding simbers!
This problem is inspired by Project Euler 520: Simbers. "We define a simber to be a positive integer in which any odd digit, ...

9 years 前

已解决


Max Change in Consecutive Elements
If an array is given as input then find the index of consecutive elements that represent maximum change. Example: Input ...

9 years 前

加载更多