A résolu


Given two strings, find the maximum overlap
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...

plus de 11 ans il y a

A résolu


Get the area codes from a list of phone numbers
Given a string of text with phone numbers in it, return a unique'd cell array of strings that are the area codes. s = '508-647...

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


Find the two-word state names
Given a list of states, remove all the states that have two-word names. If s1 = 'Alabama Montana North Carolina Vermont N...

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


peta to nano (x-ray)
for certain x-ray radiation, given frequency in petahertz, give wavelength in nanometer, must be accurate +/- 25%

plus de 11 ans il y a

A résolu


surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

plus de 11 ans il y a

A résolu


Return the 'Size' of a String of Code
One of the most 'mysterious' parts of playing Cody is the sizing system. Given a string of commands, return the size that Cody w...

plus de 11 ans il y a

A résolu


Set defaults
Write a function that computes the volume of a cube. The function should be able to accept three inputs: the length, width, and...

plus de 11 ans il y a

A résolu


Sum of first n terms of a harmonic progression
Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....

plus de 11 ans il y a

A résolu


"mirror" matrix
Create n x 2n "mirror" matrix of this type: e.g. for n = 2 m = [1 2 2 1;1 2 2 1] e.g. for n = 3 m = [1 2 3 3 2 1...

plus de 11 ans il y a

A résolu


Find matching parenthesis
One of the most indispensable things about a great text editor for programming is the ability to quickly jump between matching p...

plus de 11 ans il y a

A résolu


Kaprekar numbers
Test if the input is a Kaprekar number: <http://mathworld.wolfram.com/KaprekarNumber.html>. Return a logical true or false. ...

plus de 11 ans il y a

A résolu


Twins in a Window
<http://en.wikipedia.org/wiki/Twin_primes Twin primes> are prime numbers that differ by 2, such as [11,13] or [41,43]. Write a f...

plus de 11 ans il y a

A résolu


Number of toolboxes?
Return a number equal to the number of toolboxes available to the Cody solvers.

plus de 11 ans il y a

A résolu


Getting the absolute index from a matrix
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to get the <http://www.ma...

plus de 11 ans il y a

A résolu


Test if a Number is a Palindrome without using any String Operations
*Description* Given an integer _X_, determine if it is a palindrome number. That is, _X_ is equal to the _X_ with the digits ...

plus de 11 ans il y a

A résolu


collision
several cars (n) were involved in this collision, the input matrix (vm) has n rows and two columns, first column for velocity an...

plus de 11 ans il y a

A résolu


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

plus de 11 ans il y a

A résolu


Return unique values without sorting
If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The *values of B are in the s...

plus de 11 ans il y a

A résolu


middleAsColumn: Return all but first and last element as a column vector
Given input A, return all but the first and last elements, arranged as a column vector. (I.e., all dimensions after the first s...

plus de 11 ans il y a

A résolu


Circumscribed circles
Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle. Example: [3 4 5] -> 2.5

plus de 11 ans il y a

A résolu


Count from 0 to N^M in base N.
Return an array of numbers which (effectively) count from 0 to N^M-1 in base N. The result should be returned in a matrix, with ...

plus de 11 ans il y a

A résolu


Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

plus de 11 ans il y a

A résolu


Choose the best fitting dominoes
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...

plus de 11 ans il y a

A résolu


Find best domino orientation
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...

plus de 11 ans il y a

A résolu


Stuff the Board
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...

plus de 11 ans il y a

A résolu


Find perfect placement of non-rotating dominoes (easier)
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...

plus de 11 ans il y a

A résolu


Rotate and display numbered tile
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...

plus de 11 ans il y a

Charger plus