已解决


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

13 years 前

已解决


radius of a spherical planet
you just measured its surface area, that is the input.

13 years 前

已解决


Elapsed Time
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

13 years 前

问题


A stroll on the beach: finding a route round a connected region
You are standing on the beach of an island, which you must explore by walking all the way round its coast. Each step is in one o...

13 years 前 | 1 | 12 个解题者

已解决


A stroll on the beach: finding a route round a connected region
You are standing on the beach of an island, which you must explore by walking all the way round its coast. Each step is in one o...

13 years 前

已解决


Create a function handle that reverses the input arguments of another function handle
Given a function that takes two input arguments and returns one output, create another function handle that performs the same op...

13 years 前

已解决


Kaprekar Steps
6174 is the <http://en.wikipedia.org/wiki/6174_%28number%29 Kaprekar constant>. All natural numbers less than 10,000 (except som...

13 years 前

已解决


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

13 years 前

已解决


Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

13 years 前

已解决


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

13 years 前

已解决


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

13 years 前

已解决


It dseon't mettar waht oedrr the lrettes in a wrod are.
An internet meme from 2003 (read more <http://www.snopes.com/language/apocryph/cambridge.asp here>) asserted that readers are re...

13 years 前

已解决


Knight's Tour Checker
Given a matrix a, determine whether or not a legal <http://en.wikipedia.org/wiki/Knight's_tour knight's tour> is present. The kn...

13 years 前

已解决


Mandelbrot Numbers
The <http://en.wikipedia.org/wiki/Mandelbrot_set Mandelbrot Set> is built around a simple iterative equation. z(1) = c z...

13 years 前

已解决


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

13 years 前

已解决


What is the next step in Conway's Life?
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 ...

13 years 前

已解决


Clean the List of Names
Given a list of names in a cell array, remove any duplications that result from different capitalizations of the same string. So...

13 years 前

已解决


Alphabetize by last name
Given a list of names in a cell array, sort the list by the last name. So if list = {'Barney Google','Snuffy Smith','Dagwood ...

13 years 前

已解决


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

13 years 前

已解决


Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

13 years 前

已解决


Remove the small words from a list of words.
Your job is to tidy up a list of words that appear in a string. The words are separated by one or more spaces. Remove all words ...

13 years 前

已解决


Connect Four Win Checker
<http://en.wikipedia.org/wiki/Connect_Four Connect Four> is a game where you try to get four pieces in a row. For this problem, ...

13 years 前

已解决


Find the two most distant points
Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...

13 years 前

已解决


Interpolator
You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end...

13 years 前

已解决


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

13 years 前

已解决


Find relatively common elements in matrix rows
You want to find all elements that exist in greater than 50% of the rows in the matrix. For example, given A = 1 2 3 5 ...

13 years 前

已解决


inner product of two vectors
inner product of two vectors

13 years 前

已解决


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

13 years 前

已解决


Scrabble Scores
Given a word, determine its score in <http://en.wikipedia.org/wiki/Scrabble Scrabble>. The input string will always be provide...

13 years 前

已解决


Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

13 years 前

加载更多