Solved


Next Tribonacci Number
The "Tribonacci" sequence is an extension of the idea of the Fibonacci sequence: That is, each new term is the sum of the thr...

5 months ago

Solved


Generate Tribonacci Sequence
The "Tribonacci" sequence is an extension of the idea of the Fibonacci sequence: That is, each new term is the sum of the thr...

5 months ago

Solved


Generate Pascal's Triangle Matrix
Pascal's triangle is an arrangement of numbers where each value is the sum of the values adjacent to it in the previous row: ...

5 months ago

Solved


Determine if Input is Oddish or Evenish (Odd/Even Sum of Digits)
Given a positive integer n, determine whether n is "oddish" or "evenish" - that is, whether the sum of the digits of n is odd or...

5 months ago

Solved


Boustrophedon
Given a vector v and a positive integer n, return an m-by-n matrix containing the elements of v row-wise, alternating left-to-ri...

5 months ago

Solved


Dartboard Average II
A dartboard arranges the numbers 1 to 20 such that each value is typically flanked by quite different values - for example, 20 i...

5 months ago

Solved


Dartboard Average I
A dartboard arranges the numbers 1 to 20 such that each value is typically flanked by quite different values - for example, 20 i...

5 months ago

Solved


Possible Rugby Scores
Given a natural number s (> 4), representing a rugby team's score, return an n-by-3 matrix representing all n possible combinati...

5 months ago

Solved


Split Even Number Into Two Primes
Given an even whole number n (> 2), return a 2-element vector of primes, p, such that p(1) + p(2) = n. The elements of p should ...

5 months ago

Solved


Determine if input is a perfect number
A perfect number occurs whent the sum of all divisors of a positive integer, except the number itself, equals the number. Examp...

5 months ago

Solved


Langston's Ant
The <http://en.wikipedia.org/wiki/Langton%27s_ant Langston's Ant> Challenge is to determine the number of Black squares after K ...

5 months ago

Solved


[Master Regular Expression] String Matching in an Array
Given an array of string words, return all strings in words that are a substring of another word. You can return the answer in a...

5 months ago

Solved


[Master Regular Expression] Goat Latin
You are given a string sentence that consist of words separated by spaces. Each word consists of lowercase and uppercase letters...

5 months ago

Solved


[Master Regular Expression] Reformat Phone Number
You are given a phone number as a string number. number consists of digits, spaces ' ', and/or dashes '-'. You would like to re...

5 months ago

Solved


[Master Regular Expression] String To Integer
Implement the myAtoi(string s) function, which converts a string to a 32-bit signed integer. The algorithm for myAtoi(string s)...

5 months ago

Solved


[Master Regular Expression] Strong Password Checker II
A password is said to be strong if it satisfies all the following criteria: It has at least 8 characters. It contains at l...

5 months ago

Solved


[Master Regular Expression] Validate IP Address
Given a string queryIP, return "IPv4" if IP is a valid IPv4 address, "IPv6" if IP is a valid IPv6 address or "Neither" if IP is ...

5 months ago

Solved


[Master Regular Expression] Keyboard Row
Given an array of strings words, return the words that can be typed using letters of the alphabet on only one row of American ke...

5 months ago

Solved


[Master Regular Expression] Unique Email Addresses
Every valid email consists of a local name and a domain name, separated by the '@' sign. Besides lowercase letters, the email ma...

5 months ago

Solved


Determine whether the input is odd, even, or neither.
Make a function that returns ‘odd’ if the input is odd, ‘even’ if the input if even or ‘error’ if the input is neither odd nor ...

5 months ago

Solved


Unusual Concatenations
The sum of the squares of certain unusual integers is equal to the concatenation of their individual digits. For example: ...

5 months ago

Solved


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

5 months ago

Solved


Count integers in randomized vector that are multiples of a given number.
The mod() function We might all remember the days when we were taught to divide and then set the remainder aside if the numbers...

5 months ago

Solved


Determine if a number is a cool number
A number is considered cool if it is 3 digits, has a 5 in it, and is divisible by 4.

5 months ago

Solved


UICBioE240 2.7
Given two 3-element vectors x1 and x2, create a 3 x 3 x 3 matrix Y where (:,:,1) has all values of x1 * x2, (:,:,2) has all valu...

5 months ago

Solved


Ratio between sums of prime and non-prime numbers
Write a function that calculates the ratio between the sum of the prime numbers lower or equal than x, and the sum of the non-pr...

5 months ago

Solved


Basics: Divide integers to get integer outputs in all cases
Divide integers a and b in such a way that output y is always an integer (in ceil manner)

5 months ago

Solved


collision
several cars (n) were involved in this collision, the input matrix (vm) has n rows and two columns, first column for velocity an...

5 months ago

Solved


give-nth-decimal-place-of-pi up to 100 digits
max 100th place after the decimal point this is upgrade problem of 142

5 months ago

Solved


Chebyshev polynomials of the 1st Kind
Given an integer _n_ &ge; 0, generate the _n_-th <http://en.wikipedia.org/wiki/Chebyshev_polynomials Chebyshev polynomial of the...

5 months ago

Load more