Community Profile

photo

Stephen Cohen


Last seen: 4달 전
46 2017 이후 총 참여 횟수

Stephen Cohen's 배지

  • Leader
  • Commenter
  • Promoter
  • Solver

세부 정보 보기...

참여 게시물
보기 기준

해결됨


Birthday cake
It's Cody's 5th birthday, and you've been tasked with putting the candles on the cake. Your goal is to maximize the distance bet...

2년 이상 전

해결됨


"Cody" * 5 == "CodyCodyCodyCodyCody"
*Alice*: What? *"Cody" * 5 == "CodyCodyCodyCodyCody"*? You've gotta be kidding me! *Bob*: No, I am serious! Python supports...

2년 이상 전

해결됨


5th Time's a Charm
Write a function that will return the input value. However, your function must fail the first four times, only functioning prope...

2년 이상 전

해결됨


Digit concentration in Champernowne's constant
Consider the first 50 digits of Champernowne's constant 0.12345678910111213141516171819202122232425262728293... The...

2년 이상 전

해결됨


Circumscribed Pentagon?
Building off of <https://www.mathworks.com/matlabcentral/cody/problems/44368 Problem 44368>, your function will be provided with...

2년 이상 전

해결됨


Group-wise Euclidean distance
*Input*: * *x* —— An array of size *n-by-d*, where each row vector denotes a point in a d-dimensional space; * *g* —— A gro...

2년 이상 전

해결됨


An asteroid and a spacecraft
Imagine a non-relativistic simple situation. Assume positions p0, p1, p2, and p3 are three dimensional Cartesian coordinates...

2년 이상 전

해결됨


Acid and water
Assume that there is a 100 liter tank. It is initially filled with just distilled water. It is continuously drained at R...

2년 이상 전

해결됨


Sums of Distinct Powers
You will be given three numbers: base, nstart, and nend. Write a MATLAB script that will compute the sum of a sequence of both ...

2년 이상 전

해결됨


Cache me Outside
The test suite includes a simple recursive Fibonacci sequence generator, but it's terribly inefficient. One simple method for im...

2년 이상 전

해결됨


Number of Even Elements in Fibonacci Sequence
Find how many even fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...

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

해결됨


Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

3년 이하 전

해결됨


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

3년 이하 전

해결됨


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

3년 이하 전

해결됨


Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

3년 이하 전

해결됨


Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

3년 이하 전

해결됨


Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

3년 이하 전

해결됨


Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

약 3년 전

해결됨


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

약 3년 전

해결됨


The Goldbach Conjecture
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

약 3년 전

해결됨


Which values occur exactly three times?
Return a list of all values (sorted smallest to largest) that appear exactly three times in the input vector x. So if x = [1 2...

약 3년 전

해결됨


Remove the vowels
Remove all the vowels in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill' Output s2 is 'Jck nd Jll wn...

약 3년 전

해결됨


Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

약 3년 전

해결됨


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

약 3년 전

해결됨


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

약 3년 전

해결됨


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

약 3년 전

해결됨


Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

약 3년 전

해결됨


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

약 3년 전

해결됨


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

약 3년 전

Load more