문제를 풀었습니다


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

대략 13년 전

문제를 풀었습니다


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

대략 13년 전

문제를 풀었습니다


Implement simple rotation cypher
If given a letter from the set: [abc...xyz] and a shift, implement a shift cypher. Example: 'abc' with a shi...

대략 13년 전

문제를 풀었습니다


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

대략 13년 전

문제를 풀었습니다


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

대략 13년 전

문제


Count the Number of Directed Cycles in a Graph
Given an asymmetric adjacency matrix, determine the number of unique *directed* cycles. For example, the graph represented by...

대략 13년 전 | 5 | 솔버 수: 21

문제


Count the Number of Undirected Cycles in a Graph
Given a symmetric adjacency matrix, determine the number of unique *undirected* cycles. For example, the graph represented by...

대략 13년 전 | 9 | 솔버 수: 20

문제를 풀었습니다


Count the Number of Undirected Cycles in a Graph
Given a symmetric adjacency matrix, determine the number of unique *undirected* cycles. For example, the graph represented by...

대략 13년 전

문제를 풀었습니다


Count the Number of Directed Cycles in a Graph
Given an asymmetric adjacency matrix, determine the number of unique *directed* cycles. For example, the graph represented by...

대략 13년 전

문제를 풀었습니다


inner product of two vectors
inner product of two vectors

대략 13년 전

문제


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년 전 | 6 | 솔버 수: 298

문제를 풀었습니다


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

대략 13년 전

문제를 풀었습니다


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

대략 13년 전

문제를 풀었습니다


Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

대략 13년 전

문제를 풀었습니다


Find best placement for ordered dominoes (harder)
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...

대략 13년 전

문제를 풀었습니다


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

대략 13년 전

문제를 풀었습니다


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

대략 13년 전

문제를 풀었습니다


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

대략 13년 전

문제를 풀었습니다


Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

대략 13년 전

문제를 풀었습니다


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

대략 13년 전

문제를 풀었습니다


Scoring for oriented dominoes
Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

대략 13년 전

문제를 풀었습니다


Summing Digits within Text
Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...

대략 13년 전

문제를 풀었습니다


Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example: [q,r] = swap(5,10) returns q = ...

대략 13년 전

문제를 풀었습니다


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

대략 13년 전

문제를 풀었습니다


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

대략 13년 전

문제를 풀었습니다


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년 전

문제를 풀었습니다


Trimming Spaces
Given a string, remove all leading and trailing spaces (where space is defined as ASCII 32). Input a = ' singular value deco...

대략 13년 전

문제를 풀었습니다


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

대략 13년 전

문제를 풀었습니다


Return a list sorted by number of occurrences
Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

대략 13년 전

문제


Compute next 1000-day birthday milestone
Given a birthdate in DD-MMM-YYYY format, compute the next 1000-day birthday milestone. For example, Abraham Lincoln was born on ...

대략 13년 전 | 0 | 솔버 수: 24

더 보기