해결됨


Duplicates
Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

2년 이하 전

해결됨


Find the peak 3n+1 sequence value
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

2년 이하 전

해결됨


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

2년 이하 전

해결됨


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

2년 이하 전

해결됨


Spot the First Occurrence of 5
This problem series invites you to solve two simple problems related to the integer NUMBER FIVE, in order to celebrate <https://...

2년 이하 전

해결됨


Basic electricity in a dry situation
&#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#9889 &#...

2년 이하 전

해결됨


MATLAB Counter
Write a function f = counter(x0,b) to construct a counter handle f that counts with an initial value x0 and a step size b. E...

2년 이하 전

해결됨


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

2년 이하 전

해결됨


Is it really a 5?
A number containing at least one five will be passed to your function, which must return true or false depending upon whether th...

2년 이하 전

해결됨


Breaking Out of the Matrix
Do you want to take the Red Pill, or the Blue Pill? If you take the Blue Pill, you will simply pass along to the next problem...

2년 이하 전

해결됨


Solitaire Cipher
Implement the <http://en.wikipedia.org/wiki/Solitaire_(cipher) solitaire cipher>. Since this is from Wikipedia, I am capturin...

2년 이하 전

해결됨


How long is the longest prime diagonal?
Stanislaw Ulam once observed that if the counting numbers are <http://en.wikipedia.org/wiki/Ulam_spiral arranged in a spiral>, t...

2년 이하 전

해결됨


Spot the outlier
All points except for one lie on a line. Which one is the outlier? Example: You are given a list of x-y pairs in a column ...

2년 이하 전

해결됨


Find a subset that divides the vector into equal halves
Given a vector x, return the indices to elements that will sum to exactly half of the sum of all elements. Example: Inpu...

2년 이하 전

해결됨


Elements with highest local average
Input v is a row vector such that length(v)>3. Consider a sliding window of length 3 that is used to calculate the local average...

2년 이하 전

해결됨


Hard limit function
Classify x data as if x>=0 then y=1 if x<0 then y=0 Example x = [ -2 -1 0 1 2] y = [ 0 0 1 1 1]

2년 이하 전

해결됨


Permute diagonal and antidiagonal
Permute diagonal and antidiagonal For example [1 2 3;4 5 6;7 8 9] -> [3 2 1;4 5 6;9 8 7] WITHOUT diag function (and variable n...

2년 이하 전

해결됨


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

2년 이하 전

해결됨


Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

2년 이하 전

해결됨


Get the elements of diagonal and antidiagonal for any m-by-n matrix
In the problem <http://www.mathworks.com/matlabcentral/cody/problems/858-permute-diagonal-and-antidiagonal Problem 858. Permute ...

2년 이하 전

해결됨


Return a list sorted by number of consecutive occurrences
Inspired by Problem 38 by Cody Team. Given a vector x, return a vector y of the values in x sorted by the number of CONSECUTIVE...

2년 이하 전

해결됨


The 5th Root
Write a function to find the 5th root of a number. It sounds easy, but the typical functions are not allowed (see the test su...

약 2년 전

해결됨


Clock Hand Angle 1
Given a time in HH:MM:SS, find the smallest angle (in degrees) between the hour and minute hand

약 2년 전

해결됨


N-th Odious
Given index n return n-th <https://oeis.org/A000069 odious number>.

약 2년 전

해결됨


Find the biggest empty box
You are given a matrix that contains only ones and zeros. Think of the ones as columns in an otherwise empty floor plan. You wan...

약 2년 전

해결됨


Pi Digit Probability
Assume that the next digit of pi constant is determined by the historical digit distribution. What is the probability of next di...

약 2년 전

해결됨


calculate PI without using pi function
There are many methods to get the pi(Ratio of circumference to diameter). You should get pi without using the pi function in M...

약 2년 전

해결됨


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

약 2년 전

해결됨


Remove all the words that end with "ain"
Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

약 2년 전

해결됨


Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

약 2년 전

Load more