Solved


Recurrence relation
A recurrence relation is given by P(1) := 1 P(n+1) := exp(1) - (n+1)*P(n) Write a function that, given an integer |...

10 years ago

Solved


Back to basics - array operations
Without performing actual arithmetic operations on arrays, return feasibility of operation as true or false. True if given opera...

10 years ago

Solved


Replace secondary diagonal elements of a square array
Replace all the secondary diagonal elements of the square array A with the number n Example: A = [1 2 3 4 5 6 ...

10 years ago

Solved


Remove all the words that end with "ain"
Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...

10 years ago

Solved


interesting center of magic matrix
output the centre of magic matrix of n input=7; output=25

10 years ago

Solved


Is the Point in a Triangle?
Check whether a point or multiple points is/are in a triangle with three corners Points = [x, y]; Triangle = [x1, y1; x...

10 years ago

Solved


Pattern matching
Given a matrix, m-by-n, find all the rows that have the same "increase, decrease, or stay same" pattern going across the columns...

10 years ago

Solved


Sums with Excluded Digits
Add all the integers from 1 to n in which the digit m does not appear. m will always be a single digit integer from 0 to 9. no...

10 years ago

Solved


Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

10 years ago

Solved


Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

10 years ago

Solved


Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

10 years ago

Solved


Perimeter
Given a sequence of points forming a closed path (first and last points are coincident) return the perimeter value. For example...

10 years ago

Solved


Largest Twin Primes
<http://en.wikipedia.org/wiki/Twin_prime Twin primes> are primes p1, p2 = p1 + 2 such that both p1 and p2 are prime numbers. Giv...

10 years ago

Solved


Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...

10 years ago

Solved


N-Cards Problem
You have a deck of _N_ cards numbered in order from 1 to _N_. You discard the top card (card 1) and place the next card (card 2)...

10 years ago

Solved


Poker Series 11: selectBestHand
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is t...

10 years ago

Solved


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

10 years ago

Solved


Poker Series 10: bestHand
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is t...

10 years ago

Solved


Poker Series 09: IsHighCard
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is t...

10 years ago

Solved


Poker Series 07: IsTwoPair
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is t...

10 years ago

Solved


Poker Series 08: IsPair
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is t...

10 years ago

Solved


Poker Series 06: isThreeKind
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is t...

10 years ago

Solved


Poker Series 03: isFullHouse
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is t...

10 years ago

Solved


Poker Series 02: isQuads
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is to...

10 years ago

Solved


Poker Series 01: isStraightFlush
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is t...

10 years ago

Solved


Poker Series 04: isFlush
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is t...

10 years ago

Solved


Poker Series 05: isStraight
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is t...

10 years ago

Solved


Clock Hand Angle 1
Given a time in HH:MM:SS, find the smallest angle (in degrees) between the hour and minute hand

10 years ago

Solved


Angles of the hands of a clock
For this problem, consider an analog (or at least continuous digital representation) of a clock. Our clock is a 12 hour clock w...

10 years ago

Solved


Angle between Two Vectors
The dot product relationship, a dot b = | a | | b | cos(theta), can be used to determine the acute angle between vector a and ve...

10 years ago

Load more