A résolu


IQpuzzler Preparation #1: Find all non-identical orientations of a matrix
Return all non-identical orientations of a 2-D matrix that can be produced by rotating or flipping it. Input is an M-by-N matri...

3 mois il y a

A résolu


Multiply each matrix element by its row index and add its column index.
Return a matrix the same size as the input, multiply each element by its row index and add its column index. Example: x = [ 1 ...

3 mois il y a

A résolu


nth permutation of 11...100...0
Given some number of ones and zeros, numOnes and numZeros respectively, find the nth permutation of the vector [ones(1,numOnes),...

3 mois il y a

A résolu


Cluster Partition
Given an array (row or column) of numbers, divide the array into consecutive positive/negative numbers. 0 is to be treated inde...

3 mois il y a

A résolu


Canadian Conundrum
After succesfully completing the French Conundrum, you have decided to take a vacation. Your trip is amongst the mighty mountai...

3 mois il y a

A résolu


French Conundrum
The French army is trapped, sorrounded in backwards direction (South and West directions) by enemy traps and ambushes. You are n...

3 mois il y a

A résolu


Easy Sequences 78: Trailing Zeros of Factorial Numbers at any Base
Given an integer and a number base , write a function that calculates the number of trailing zeros of the factorial of when wr...

3 mois il y a

A résolu


how to determine is a point is inside, on or outside a polygon?
design function determines whether the point is inside a contour, outside, or lies on an edge (or coincides with a vertex). It r...

3 mois il y a

A résolu


Zero or hero
A number will be given as an input. You can be hero if it's not zero. (Just for fun)

3 mois il y a

A résolu


Identifying teenager
Suppose the age of a person is given. If he/she is a teenage, answer is 'yes'. Otherwise, the answer is 'no'.

3 mois il y a

A résolu


Create spiral matrices
Create a matrix of a given size with sequential elements spiraling inward. For matrix height m and width n, the output should ...

3 mois il y a

A résolu


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

3 mois il y a

A résolu


Sum of Consecutive Positive Integers Equals Product of Limiting Values
Determine m and n for the following equation: For example: 3 + 4 + 5 + 6 = 6*3 is the first occurance that satisfies the equat...

3 mois il y a

A résolu


Heronian Triangles with Consecutive Integral Sides and Integral Area
Hero's area formula for any triangle with sides a, b, c is: . Heronian triangles are triangles having integral sides and integr...

3 mois il y a

A résolu


Leonardo primes
Leonardo numbers are defined by following recurrence relation: Leonard prime is Leonardo number which is also prime (see ...

3 mois il y a

A résolu


Area under the curve
Compute area under the curve specified by points stored in y, where y is in range (0,inf) and x time step is 1. note: please r...

3 mois il y a

A résolu


Tracer un carré de côté a et de centre O
Définir une fonction carre qui prend en entrée un salaire a et un vecteur O de deux élements représentant les coordonnées cartés...

3 mois il y a

A résolu


Intrication de deux vecteurs
Ecrire une fonction "intric" qui prend en entrée un vecteur ligne v1 et un vecteur ligne v2 et renvoie le vecteur ligne vres don...

3 mois il y a

A résolu


compter le nombre de zéros dans une matrice
écrire une fonction count_zeros qui prend en entrée une matrice M et détermine le nombre de zéros dans une matrice

3 mois il y a

A résolu


Calculate pi using the Mandelbrot Set.
The Mandelbrot Set is a set of complex numbers built around a simple iterative equation for which the orbit of the critical poin...

3 mois il y a

A résolu


Find the moving-average of the elements of a vector
Example Input vector: [1 2 3 4] output vector: 1st element=1/1, 2nd element=(1+2)/2, 3rd element=(1+2+3)/3, 4th element=(1+2...

3 mois il y a

A résolu


Ordinary Annuity : Number of Payments (Present Value)
Theorem : Present Value of an Ordinary Annuity where; P : Present value of all payments A : Periodic payment r : Interest ...

3 mois il y a

A résolu


Ordinary Annuity : Rate (Present Value)
Theorem : Present Value of an Ordinary Annuity where; P : Present value of all payments A : Periodic payment r : Interest ...

3 mois il y a

A résolu


Ordinary Annuity : Periodic Payment (Present Value)
Theorem : Present Value of an Ordinary Annuity where; P : Present value of all payments A : Periodic payment r : Interest ...

3 mois il y a

A résolu


Ordinary Annuity : Present Value
Theorem : Present Value of an Ordinary Annuity where; P : Present value of all payments A : Periodic payment r : Interest ...

3 mois il y a

A résolu


Ordinary Annuity : Number of payments (Future Value)
Theorem : Future Value of an Ordinary Annuity where; F : Future value A : Periodic payment r : Rate per period n : Numbe...

3 mois il y a

A résolu


Ordinary Annuity : Rate (Future Value)
Theorem : Future Value of an Ordinary Annuity where; F : Future value A : Periodic payment r : Rate per period n : Numbe...

3 mois il y a

A résolu


Ordinary Annuity : Periodic Payments (Future Value)
Theorem : Future Value of an Ordinary Annuity where; F : Future value A : Periodic payment r : Rate per period n : Numbe...

3 mois il y a

A résolu


Ordinary Annuity : Future Value
Theorem : Future Value of an Ordinary Annuity where; F : Future value A : Periodic payment r : Rate per period n : Numbe...

3 mois il y a

A résolu


Compound Interest : Compounding Periods
Theorem : Compound Interest where, F : Future value at the end of n periods P : Present value r : Annual nominal rate n :...

3 mois il y a

Charger plus