已解决


matrix of natural number
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 resides seially as shown in the examples below. ...

13 years 前

已解决


matrix zigzag
Unfold a 2-D matrix to a 1-D array in zig-zag order, e.g., for matrix [ 1 2 3 ; 4 5 6 ; 7 8 9 ] the resulting 1-...

13 years 前

已解决


Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

13 years 前

已解决


Happy 2013...
Happy 2013, everyone! An interesting tidbit about 2013 is that it is the first year since 1987 to contain four different digits...

13 years 前

已解决


Coin Tossing: Probability of Same Heads for N tosses
A pair of physicists toss a coin n times each. What is the probability that they tossed the same number of heads? *Input:*...

13 years 前

已解决


Volume difference between Ellipsoid and Sphere
Given an ellipsoid of semi principal axis (a,b,c) find the volume of the difference between this ellipsoid and the sphere with...

13 years 前

已解决


Compression: Encode and Decode
This Challenge is to compress an array created by randi(2^32-1,1000) and then decompress your data file. The first call will ...

13 years 前

已解决


Generate pi using logarithm
Generate pi using logarithm

13 years 前

已解决


USC Fall 2012 ACM: Rover Maze
This Challenge is to solve Question F, Martian Pits, of the <http://contest.usc.edu/index.php/Fall12/Home USC ACM Fall 2012 Cont...

13 years 前

已解决


Create a random logical vector of N elements of which M are true.
Your task for tomorrow is to create a random binary (logical) vector of N elements of which M are true. For example: ran...

13 years 前

已解决


Property dispute!
Two neighbors have rectangular plots of land A and B. The surveyors give you the coordinates of each. If they overlap, there is ...

13 years 前

已解决


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

13 years 前

已解决


Crossing to Kissing - Untangle the Lines
Turn lines that cross into lines that kiss. You will be given two lines that cross at some point. Your job is to untangle the...

13 years 前

已解决


String permutations on phone keyboard
Given a number such as 2639 return all possible string permutations using the phone-keyboard on <http://www.mathworks.com/matlab...

13 years 前

已解决


Find out missing number from a vector of 9 elements
You are given a vector of size 9, x = [x1 x2 x3 x4 x5 x6 x7 x8 x9] Elements of x may be randomly selected without repeati...

13 years 前

已解决


Raise Matrix to Power
For a given square matrix x and scalar a, find x^a without using '^' or 'mpower'.

13 years 前

已解决


Visualization of experimental data across a surface
Assume that you have taken data across the surface of a sample, for example sheet resistance. The data is stored in a Nx3 matri...

13 years 前

已解决


USC Fall 2012 ACM: Driving the Rover
This Challenge is to solve Question E, Driving the Rover, of the <http://contest.usc.edu/index.php/Fall12/Home USC ACM Fall 2012...

13 years 前

已解决


USC Fall 2012 ACM: Martian Pranks
This Challenge is to solve Question C, Martian Pranks, of the <http://contest.usc.edu/index.php/Fall12/Home USC ACM Fall 2012 Co...

13 years 前

已解决


USC Spring 2012 ACM: Armageddon
This Challenge is to solve Question E, Armageddon, of the <http://contest.usc.edu/index.php/Spring12/Home USC ACM Spring 2012 Co...

13 years 前

已解决


USC Fall 2012 ACM : Find Largest Water Concentration
This Challenge is to solve Question B, Water?, of the <http://contest.usc.edu/index.php/Fall12/Home USC ACM Fall 2012 Contest>. ...

13 years 前

已解决


I've got the power! (Inspired by Project Euler problem 29)
Consider all integer combinations of a^b and b^a for the integer values 2 ≤ a ≤ 4 and 2 ≤ b ≤ 5: 2^2=4, 2^3=8, 2^4=16,...

13 years 前

已解决


Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
If _p_ is the perimeter of a right angle triangle with integral length sides, { _a_, _b_, _c_ }, there are exactly three solutio...

13 years 前

已解决


Guess the Coefficients!
Given a polynomial _p_ known to have positive integer coefficients, deduce the values of the coefficients. For example: ...

13 years 前

已解决


USC Fall 2012 ACM : Code Word Minimum Flipped Bits
This Challenge is to solve Question A of the <http://contest.usc.edu/index.php/Fall12/Home USC ACM Fall 2012 Contest>. Given ...

13 years 前

已解决


Convert hex color specification to MATLAB RGB
Here's something that comes up all the time if you deal with web pages. Given a <http://www.w3schools.com/html/html_colors.as...

13 years 前

已解决


Circular Primes (based on Project Euler, problem 35)
The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime. The...

13 years 前

已解决


Largest Twin Primes
<http://en.wikipedia.org/wiki/Twin_prime Twin primes> are primes p1, p2 = p1 + 2 such that both p1 and p2 are prime numbers. Giv...

13 years 前

已解决


Square Digits Number Chain Terminal Value (Inspired by Project Euler Problem 92)
Given a number _n_, return the terminal value of the number chain formed by summing the square of the digits. According to the P...

13 years 前

已解决


Television Screen Dimensions
Given a width to height ratio of a TV screen given as _w_ and _h_ as well as the diagonal length of the television _l_, return t...

13 years 前

加载更多