Solved

Pentagonal Numbers

Your function will receive a lower and upper bound. It should return all pentagonal numbers within that inclusive range in ascen...

7 mois ago

Solved

Is this is a Tic Tac Toe X Win?

For the game of <https://en.wikipedia.org/wiki/Tic-tac-toe Tic Tac Toe> we will be storing the state of the game in a matrix M. ...

7 mois ago

Solved

Inscribed Pentagon?

Your function will be provided with the five vertices of a pentagon (p) as well as the center point (cp) and radius (r) of a cir...

7 mois ago

Solved

Circle/Pentagon Overlap

Your function will be provided with the five vertices of a pentagon (p) as well as the center point (cp) and radius (r) of a cir...

7 mois ago

Solved

Octoberfest festival

A group of students decided to visit Octoberfest festival. First they ordered one beer, then after half-hour they taken one more...

7 mois ago

Solved

Polarisation

You have n polarising filters stacked one on top of another, and you know each axis angle. How much light gets passed through th...

7 mois ago

Solved

Missing five

Convert decimal numbers to a base-9 notation missing the digit *5* <<http://www.alfnie.com/software/missing5.jpg>> Too man...

7 mois ago

Solved

ASCII Birthday Cake

Given an age and a name, give draw an ASCII birthday cake. For example, given the name "CODY" and the age 5, return a string wit...

7 mois ago

Solved

Find the nearest prime number

Happy 5th birthday, Cody! Since 5 is a prime number, let's have some fun looking for other prime numbers. Given a positive in...

7 mois ago

Solved

Extra safe primes

Did you know that the number 5 is the first safe prime? A safe prime is a prime number that can be expressed as 2p+1, where p is...

7 mois ago

Solved

Create a dictionary

The goal is to write a function that returns a dictionary from a list of words or phrases and their definitions. Here is an exam...

7 mois ago

Solved

Scrabble Scores - 2

An <https://www.mathworks.com/matlabcentral/cody/problems/56-scrabble-scores introductory Cody problem> asks the user to score a...

7 mois ago

Solved

Code breaker, Part I: Operation Phoenix

You have been tasked with decoding a set of coded messages that have been intercepted. Based on previous intelligence that ...

9 mois ago

Solved

Code breaker, Part II: Operation Orthos

You have been tasked with decoding several batches of coded messages that have been intercepted. Based on previous intellig...

9 mois ago

Solved

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

12 mois ago

Solved

Digit concentration in Champernowne's constant

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

12 mois ago

Solved

Acid and water

⚖ ⚖ ⚖ ⚖ ⚖ ⚖ ⚖ ⚖ Assume that there is a 100 liter tank. It is initially fi...

12 mois ago

Solved

Knight's Tour Checker

Given a matrix a, determine whether or not a legal <http://en.wikipedia.org/wiki/Knight's_tour knight's tour> is present. The kn...

12 mois ago

Solved

Given two strings, find the maximum overlap

Given two strings s1 and s2, create a new string s3 which is as short as possible and contains both strings. If s1 = [1 2...

12 mois ago

Solved

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

12 mois ago

Solved

Calculate the Levenshtein distance between two strings

This problem description is lifted from <http://en.wikipedia.org/wiki/Levenshtein_distance>. The Levenshtein distance betwee...

12 mois ago

Solved

Find state names that start with the letter N

Given a list of US states, remove all the states that start with the letter N. If s1 = 'Alabama Montana Nebraska Vermont Ne...

12 mois ago

Solved

Get the area codes from a list of phone numbers

Given a string of text with phone numbers in it, return a unique'd cell array of strings that are the area codes. s = '508-6...

12 mois ago

Solved

Connect Four Win Checker

<http://en.wikipedia.org/wiki/Connect_Four Connect Four> is a game where you try to get four pieces in a row. For this problem, ...

12 mois ago

Solved

Counting in Finnish

Sort a vector of single digit whole numbers alphabetically by their name, in Finnish. See the Wikipedia page for <http://en.wik...

12 mois ago

Solved

It dseon't mettar waht oedrr the lrettes in a wrod are.

An internet meme from 2003 (read more <http://www.snopes.com/language/apocryph/cambridge.asp here>) asserted that readers are re...

12 mois ago

Solved

Indexed Probability Table

This question was inspired by a Stack Overflow question forwarded to me by Matt Simoneau. Given a vector x, make an indexed pro...

12 mois ago

Solved

Renaming a field in a structure array

MATLAB has a <http://www.mathworks.com/help/techdoc/ref/setfield.html setfield> and a <http://www.mathworks.com/help/techdoc/ref...

12 mois ago

Solved

Remove the polynomials that have positive real elements of their roots.

The characteristic equation for a dynamic system is a polynomial whose roots indicate its behavior. If any of the <http://www.ma...

12 mois ago

Solved

Longest Divisor Run

Given the vector a, find the longest run of consecutive numbers that can be evenly divided by the same number d where d > 1. ...

environ un an ago