Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Load more