Solved


switch base
Input an integer, switch its base. Input is a string, so is output.

2 years ago

Solved


Mean number of letters per word (Hard)
The previous problem in this series is <https://www.mathworks.com/matlabcentral/cody/problems/44852-mean-number-of-letters-per-w...

2 years ago

Solved


Mean number of letters per word (Easy)
Given a character array, s, representing a sentence, return a, the arithmetic mean of the number of letters per word in the give...

2 years ago

Solved


Map all the indices of an Array Indices into a Vector giving Index vs Row and Column
Create an array of the row and column values for the indices of an array. This is typically performed using [r c]=ind2sub(siz...

2 years ago

Solved


Create array of all Distances between two Sets of Points
This Challenge is a subsection of Martian Pranks based on Tim's efficient Distance calculation between sets of points. Given Po...

2 years ago

Solved


Sorting integers by their digits (Level 1)
Given a vector, v, of positive integers, return a vector, w, by sorting v in ascending order, such that primary sorting is done ...

2 years ago

Solved


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

2 years ago

Solved


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

2 years ago

Solved


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.

2 years ago

Solved


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

2 years ago

Solved


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

2 years ago

Solved


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

2 years ago

Solved


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

2 years ago

Problem


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

2 years ago | 3 | 8 solvers

Problem


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

2 years ago | 0 | 8 solvers

Problem


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

2 years ago | 2 | 6 solvers

Problem


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

2 years ago | 0 | 14 solvers

Solved


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

2 years ago

Solved


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.

2 years ago

Solved


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

2 years ago

Solved


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

2 years ago

Solved


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

2 years ago

Solved


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

2 years ago

Solved


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

2 years ago

Solved


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

2 years ago

Solved


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

2 years ago

Solved


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

2 years ago

Solved


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

2 years ago

Solved


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

2 years ago

Load more