Resuelto


Project Euler: Problem 8, Find largest product in a large string of numbers
Find the greatest product of five consecutive digits in an n-digit number. 73167176531330624919225119674426574742355349194934...

más de 12 años hace

Resuelto


Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

más de 12 años hace

Resuelto


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

más de 12 años hace

Resuelto


Trickier Timing
You solution should return control to main program only when the current time ends in either a 5 or 0 (e.g. the current seconds ...

más de 12 años hace

Resuelto


Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive floating-point number MATLAB can han...

más de 12 años hace

Resuelto


Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

más de 12 años hace

Resuelto


Angle between two vectors
You have two vectors , determine the angle between these two vectors For example: u = [0 0 1]; v = [1 0 0]; The a...

más de 12 años hace

Resuelto


Hackathon: the beginnings
I am thinking of a number between 1 and 10000... can you guess what this number is? *Description* The test suite has rando...

más de 12 años hace

Resuelto


Find the palindrome
Given the string a, find the longest palindromic sub-string b. So when a = 'xkayakyy'; you should return b = 'kayak';

más de 12 años hace

Resuelto


Geometric series
Find the sum, given the first term t1, the common ratio r, and number of terms n. Examples If input t1=1, r=1, n=7 the...

más de 12 años hace

Resuelto


QWERTY coordinates
Given a lowercase letter or a digit as input, return the row where that letter appears on a <http://en.wikipedia.org/wiki/Keyboa...

más de 12 años hace

Resuelto


Distance walked 1D
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...

más de 12 años hace

Resuelto


Half?
If you toss an even number (x) of coins, what is the probability (y) of 50% head and 50% tail?

más de 12 años hace

Resuelto


Project Euler: Problem 10, Sum of Primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


Back to basics 9 - Indexed References
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix and row and column, output the index of th...

más de 12 años hace

Resuelto


Back to basics 14 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody. Return a cell array of all MATLAB keywords

más de 12 años hace

Resuelto


Project Euler: Problem 5, Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

más de 12 años hace

Resuelto


Test for balanced parentheses
Given the input inStr, give the boolean output out indicating whether all the parentheses are balanced. Examples: * If ...

más de 12 años hace

Resuelto


Subset Sum
Given a vector v of integers and an integer n, return the the indices of v (as a row vector in ascending order) that sum to n. I...

más de 12 años hace

Resuelto


Remove the polynomials that have positive real elements of their roots.
The characteristic equation for a dynamic system is a polynomial whose roots indicate its behavior. If any of the <http://www.ma...

más de 12 años hace

Resuelto


Least common multiple of many numbers
1:6 -> 60

más de 12 años hace

Resuelto


Find the Kronecker Tensor Product without using KRON
The Kronecker Tensor Product is the result of multiplying all elements of a matrix with each of the elements of another matrix. ...

más de 12 años hace

Resuelto


Selecting books on MATLAB for experts and beginners (blindfolded)
* Imagine you have been blindfolded and asked to pick up any two books randomly from the table. * There are n books suitable f...

más de 12 años hace

Resuelto


Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.

más de 12 años hace

Resuelto


Lose control
Remove all characters that are below space in ASCII value.

más de 12 años hace

Resuelto


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

más de 12 años hace

Resuelto


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

más de 12 años hace

Resuelto


Encode Roman Numerals
Create a function taking a non-negative integer as its parameter and returning a string containing the Roman Numeral representat...

más de 12 años hace

Cargar más