Solved


find the nth fibonacci number
The Fibonacci sequence is defined as follows: give n, find the nth fibonacci number

6 months ago

Solved


Find nth number
The numbers 2 and 7 are called lucky numbers, an integer containing only the digits 2 and 7 is also called lucky number. The pro...

6 months ago

Solved


Modular multiplicative inverse
Modular multiplicative inverse is used for _The Chinese Remainder Theorem_ and _RSA algorithm_. You can visit <http://en.wikiped...

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

6 months ago

Solved


Easy Sequences 40: Quadratic Congruence
Quadratic Congruence is a modular equation of the form: . In this exercise you will be given a vector containing the coefficie...

6 months ago

Solved


Return the sum of all even numbers in a vector
Write a function that takes a vector of integers and returns the sum of all even numbers.

6 months ago

Solved


How to reverse spdiags?
The spdiags function extracts all nonzero diagonals from the m-by-n matrix A. So if A=[1 2 3;4 5 6;7 8 9], spdiags(A)=[7 4...

6 months ago

Solved


Find last non-zero in a given dimension
You are given a logical matrix *BW* _of any dimension_, and a dimension *dim*. You need to find the locations of the last non-ze...

6 months ago

Solved


Sorting integers by their digits (Level 4)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42815-sorting-integers-by-their-digits-level...

6 months ago

Solved


Sorting integers by their digits (Level 3)
This is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/42811-sorting-integers-by-their-digits-level...

6 months ago

Solved


Find Pseudo-Cyclic Number
A cyclic number is an integer in which cyclic permutations of the digits are successive multiples of the number https://en.wikip...

6 months ago

Solved


Goldbach's marginal conjecture - Write integer as sum of three primes
Goldbach's strong conjecture states that every even integer greater than 2 can be expressed as the sum of two primes. For exampl...

6 months ago

Solved


Counting the Grand Primes
A grand prime pair is a pair of primes, p1 and p2=p1+1000, such that both numbers are prime. Like a twin prime pair, where the d...

6 months ago

Solved


Hilbert numbers
Given a positive integer, n, return h as follows: 1. If n is not a <https://en.wikipedia.org/wiki/Hilbert_number Hilbert numb...

6 months ago

Solved


Compute the tersum
The tersum, which appears in certain mathematical games, involves adding two numbers in base 3 without carry and converting back...

6 months ago

Solved


Find the smallest prime with n inside
Consider the sequence that begins 101, 113, 127, 131, 149, 151, 163,... Not only is every term prime, the th term is the smalles...

6 months ago

Solved


Relative points in 2D: problem 2
The 2D pose of a robot, with respect to a world coordinate frame {O}, is described by a 3x3 homogenous transform matrix T. A lan...

6 months ago

Solved


q-dimensional Cartesian product
Your mission, should you choose to accept it, is to compute a q-dimensional Cartesian product, as follows. Let the input G be an...

6 months ago

Problem


q-dimensional Cartesian product
Your mission, should you choose to accept it, is to compute a q-dimensional Cartesian product, as follows. Let the input G be an...

6 months ago | 0 | 4 solvers

Solved


Mmm! Multi-dimensional Matrix Multiplication
You have got a couple of multi-dimensional matrices, A and B. And want to multiply them. For the first 2 dimensions, an ordinary...

7 months ago

Solved


Temperature Conversion Utility (Strings)
This is a follow-on problem to <http://www.mathworks.com/matlabcentral/cody/problems/2413-temperature-conversion-utility Problem...

7 months ago

Solved


Accurate Division
Given three integers x, y and d, return x/y (as a string) to d significant digits. Remove leading and trailing zeros. Example...

7 months ago

Solved


Deduce Equations for Simplified Interstellar Doppler Effect ✨
R2-D2 and C-3PO are friends. R2-D2 boards a spacecraft bound to a galaxy far, far away, but is always in contact with C-3PO, als...

7 months ago

Solved


Pancake sorting - minimum flips.
Sort a stack of pancakes by flipping them using spatula. There are N pancakes with diameters 1:N. Spatula can be inserted anyw...

7 months ago

Solved


Pancake sorting
Sort a stack of pancakes by flipping them using spatula. * There are _N_ pancakes with diameters _1:N_. * Spatula can be ins...

7 months ago

Load more