A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

A résolu


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

plus de 10 ans il y a

Charger plus