문제를 풀었습니다


Mo money, mo math #2! (★★★)
(adapted from Prob 9 Cody team) You have a matrix for which each row is a person and the columns represent the number of quar...

1년 초과 전

문제를 풀었습니다


Return the sequence element II
Given positive integers x and n, return a positive integer, y, which is the nth term in the <https://en.wikipedia.org/wiki/Juggl...

1년 초과 전

문제를 풀었습니다


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for.

1년 초과 전

문제를 풀었습니다


Pairwise column flip
Given matrix *M_in*, flip every pair of columns. So if *M_in* is 1 2 3 4 1 2 3 4 then *M_out* is 2 1 4 3 2 1 4 3 ...

1년 초과 전

문제를 풀었습니다


Volume of this donut
Given hole diameter a, and outermost diameter b, determine the volume y of the resulting donut.

1년 초과 전

문제를 풀었습니다


Compress strings (not springs)
Please remove excess space, limit one space between others, and no space before punctuation marks. * For example, 'Trendy , ...

1년 초과 전

문제를 풀었습니다


How many trades represent all the profit?
Given a list of results from trades made: [1 3 -4 2 -1 2 3] We can add them up to see this series of trades made a profit ...

1년 초과 전

문제


Calculating the Union Area of Overlapping Rectangles
Calculate the area covered by a union of multiple rectangles. Each rectangle is represented by 4 integers: the first two integer...

1년 초과 전 | 3 | 솔버 수: 8

문제


Reversing Maximal Ascending Subsequences
Create and return a new array that contains the same elements as the input array, but with the elements within each strictly inc...

1년 초과 전 | 0 | 솔버 수: 8

문제


Largest Rectangle Area in a Histogram
Given a histogram represented by an array of integers, e.g., [2, 1, 4, 5, 1, 3, 3] : find the maximum area of a rectangle tha...

1년 초과 전 | 2 | 솔버 수: 6

문제


Secret Message and Acrostic
One of the simplest ways to hide a message involves utilizing uppercase letters. Given a text, collect all uppercase letters in...

1년 초과 전 | 0 | 솔버 수: 13

문제를 풀었습니다


No of squares in a grid
given a m*n grid calculate the no of possible squares & rectangles on that grid. output: y=[no of rectangles , no of sqa...

1년 초과 전

문제를 풀었습니다


How many rectangles in a grid ?
How many rectangles are there in an m × n grid ? For example, if m=1 & n=2, we have 3 rectangles.

1년 초과 전

문제를 풀었습니다


Area-04
The dimension of a rectangle is given. There are two circles of equal size that are inscribed inside it.The circles are tangent ...

1년 초과 전

문제를 풀었습니다


Dominant Matrix - 01
A matrix is said to be diagonally dominant if for every row of the matrix, the magnitude of the diagonal entry in a row is large...

1년 초과 전

문제를 풀었습니다


Exhaust all possible logical vectors
Input a length argument and list all possible logical vectors of that length. My solution is of size 29. Can you find an even s...

1년 초과 전

문제를 풀었습니다


Create a column vector of n elements between a and b (both included)
Given lower limit a and an upper limit b, create a column vector of n elements inclusive of a and b. For example: a = 1, b = 4,...

1년 초과 전

문제를 풀었습니다


Make the first letter of a sentence Capital.
In this problem you will be given a string of 2 or 3 lines. Your work is to make the first letters of every line Capital. You wi...

1년 초과 전

문제를 풀었습니다


XOR fibonacci
a & b are the first two terms in the xor fibonacci sequence. Find the nth term of that sequence. XOR fib sequence is that in ...

1년 초과 전

문제를 풀었습니다


Return longest string in 1-D array of strings
Find the longest string in an array of strings. Return an empty string if the initial array is empty. If there are multiple stri...

1년 초과 전

문제를 풀었습니다


String Manipulator
Write a script that takes a string as an input and returns a cell array containing – I. the count of vowels. II. Find the ind...

1년 초과 전

문제를 풀었습니다


Convert sorting indices to ranks

1년 초과 전

문제를 풀었습니다


7 segment LED display
Given a whole number, output how many segments would be lit up to display it on a 7 segment LED display (see Wikipedia: http://e...

1년 초과 전

문제를 풀었습니다


Half?
If you toss an even number (x) of coins, what is the probability (y) of 50% head and 50% tail?

1년 초과 전

문제를 풀었습니다


The Tower of Hanoi
In the <http://en.wikipedia.org/wiki/Tower_of_Hanoi Tower of Hanoi problem> with 3 rods (1, 2 & 3), the goal is to move a tower ...

1년 초과 전

문제를 풀었습니다


Convert Hard Drive marketing sizes to actual data sizes
Hard drive sizes are typically marketed using the decimal meaning of prefixes, whereas RAM uses binary meanings. For example: ...

1년 초과 전

문제를 풀었습니다


remove nans fast
There are several ways to locate and remove nans in a matrix, and return an 1d row vector. In this problem the challenge is ...

1년 초과 전

문제를 풀었습니다


Find the quantization index of an analog value using a 6-bit quantizer.
Given a sinusoidal waveform x(t)=4.5*sin(2*pi*100*t) is sampled at 8000 sample per second. Assume that signal range is between -...

1년 초과 전

문제를 풀었습니다


Gambler?
Given a handle to a wealth function, confirm within 100 milliseconds 'Millionaire', 'Likely', or 'Gambler', if wealth() returns ...

1년 초과 전

문제를 풀었습니다


Back to basics 18 - justification
Covering some basic topics I haven't seen elsewhere on Cody. Given a string with extra spaces in front and/or in back, return...

1년 초과 전

더 보기