Solved


Truncatable Primes
A truncatable prime is a leading digit is successively removed, then all resulting numbers are prime. Wiki When given a number...

18 days ago

Solved


Secure Password
You are joining the MATLAB Central platform to solve a question on Cody. The signup page, requires you to input an id and a pass...

19 days ago

Solved


Electric Potential Energy

19 days ago

Solved


Duplicate/Twins
You have to find if someone is present in 2 lists even if there's one orthographic fault in his name. Consider that an orthograp...

19 days ago

Solved


Primitive Root Modulo n
Given a positive integer n > 2, return a vector, v, of positive integers smaller than n that are primitive roots modulo n. If no...

20 days ago

Solved


Snakes and Ladders: Variable Die
This problem is a sequal to Problem 59132 Snakes and Ladders: Average Number of Turns. Instead of a 6-sided die, your function ...

20 days ago

Solved


Snakes and Ladders: Average Number of Turns
In this problem, you will play a single-player variant of the classic game Snakes and Ladders. The rules are as follows: The pl...

20 days ago

Solved


Minimum number of crossings in a complete bipartite graph
This problem is related to problem 58389. A complete bipartite graph may be drawn in different ways, such that the number of li...

20 days ago

Solved


The Yellowstone Permutation
The Yellowstone Permutation is a sequence of positive integers, defined by the following rules: No term is repeated. Given n t...

20 days ago

Solved


Exact Cover
An efficient solution to the exact cover problem can be useful in many situations. In this problem, you are welcome to use Knuth...

20 days ago

Solved


Find the dividend
Given a vector of pairwise coprime positive integers, p, and a vector of corresponding remainders, r, return a positive integer,...

20 days ago

Solved


Korselt's Criterion
A composite integer n (n>=2) divides b^n-b, i.e. mod(b^n-b,n)==0, for all integers b if and only if n is square-free (doesn't ha...

20 days ago

Solved


Circle Division
A circle can be divided into 2 sections, by placing 2 points in arbitrary locations along its circumference and drawing a straig...

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

20 days ago

Solved


Aztec Diamond domino tilings
Consider a Cartesian grid, with verteces at integer x and y values, where every four vertices around a vacant space define a uni...

20 days ago

Solved


Kurosu solver
This problem is related to <https://www.mathworks.com/matlabcentral/cody/problems/44657-kurosu-checker Problem 44657>. The ga...

20 days ago

Solved


Segmented number sequence
Given a positive integer, n, and a row vector, x, of positive integers, return a row vector, v, which is a sequence of length n ...

20 days ago

Solved


Britney unfolded
You have a long, narrow strip of paper. You are going to fold this strip of paper length-wise in half, than fold the folded stri...

20 days ago

Solved


Pronounce digits
Given a number num, select the first d decimal places and pronounce the digits (in English). The function returns the pronunciat...

20 days ago

Solved


Remove Adjacent Pairs
Given an array of integers where adjacent elements may be identical, your task is to remove these adjacent pairs. If removing on...

20 days ago

Solved


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

20 days ago

Solved


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

20 days ago

Solved


Family Savings Analysis
Given the bank accounts of individuals defined by a list of tuples containing the last name, first name, and savings: accounts ...

20 days ago

Solved


Hofstadter Female and Male sequences
The Hofstadter Female (F) and Male (M) sequences are defined as follows Write a function to compute for a given n. See http...

20 days ago

Solved


Interval Compression
Given a set of integers, the task is to create a list of closed intervals where each interval includes its endpoints. For exampl...

20 days ago

Solved


snake_case to CamelCase convention
The snake_case naming convention writes words in lowercase and separates them with underscores. In CamelCase convention, the fir...

20 days ago

Solved


CamelCase to snake_case convention
The CamelCase naming convention capitalizes the first letter of each word. In snake_case convention, words are written in lowerc...

20 days ago

Solved


Limiting Element Occurrences
You are given a list 'v' of numbers. This list may contain repeated numbers. Your objective is to create a new list that maintai...

20 days ago

Solved


Calculate the Compression of a Spring
A mechanical engineer wants to determine how much a spring will compress when a force is applied to it. According to Hooke’s Law...

20 days ago

Solved


Chromatic Tuner
Given a frequency, return the number of cents difference between the given frequency and its nearest semitone (in 12-tone equal ...

21 days ago

Load more