Risolto


Find the next square number
Given one or more integers n, find the next integer that is a square, for each of them. Example 1: n = 1; out = 4; ...

oltre 10 anni fa

Risolto


Is 3D point set Co-Planar?
This Challenge is to determine if four 3D integer points are co-planar. Given a 4x3 matrix representing four x,y,z integer poin...

oltre 10 anni fa

Risolto


Find the gcm of n given values
Create a function that given n integer values greater than zero, finds the two numbers with the greatest common divisor and retu...

oltre 10 anni fa

Risolto


Find the nearest prime
Given a positive integer 'n', the task is to find a prime number greater than or equal to 'n'. Example 1 If given 'n' is ...

oltre 10 anni fa

Risolto


sum of non-primes
The sum of the non-primes below 10 is 1+4+6+8+9+10=38 Find the sum of all the non-primes below the input, N.

oltre 10 anni fa

Risolto


Convert float to base N
The matlab function dec2base converts a positive integer number to a specified base. Extend it so that it works with non intege...

oltre 10 anni fa

Risolto


Convert integer to base26 using letters
Write a function that converts a decimal integer to base26 using the letters of the english alphabet, i.e. 0->'a', 1->'b', 2->'c...

oltre 10 anni fa

Risolto


Odd elimination
Inspired by Project Euler problem #539 You'll be given a vector from 1 to n; Going from left to right, remove the first n...

oltre 10 anni fa

Risolto


Matrix diagonalization
You will be given Two matrices A and B. Return 1 if B is the diagonal matrix of A, 0 otherwise

oltre 10 anni fa

Risolto


P-smooth numbers
This Challenge is to find <https://en.wikipedia.org/wiki/Smooth_number P-smooth number> partial sets given P and a max series va...

oltre 10 anni fa

Risolto


Multiply by 3 and subtract 1
As a class assignment, I'm making a Cody problem. It shouldn't be terribly difficult. Given the variable x as your input, mu...

oltre 10 anni fa

Risolto


N-th permutation.
Let write some permutations of positive integers. 1: 1 2 3 4 5 6 ... 2: 2 1 3 4 ... 3: 1 3 2 4 ... ...

oltre 10 anni fa

Risolto


Breaking Bad Tiles (Spelling with Element Symbols)
Given a word, how you would spell it with element symbols from the periodic table? For instance, if given the string "Paper", yo...

oltre 10 anni fa

Risolto


Fun with a compass
Each night for the past week, you have been having the same nightmare: You find yourself back in your junior high school geometr...

oltre 10 anni fa

Risolto


Find the Area of a Polygon
Consider 2-D geometry and assume that the points are given in form of rows of a matrix. Find the area of polygon enclosed by the...

quasi 11 anni fa

Risolto


Number of occurrences of letter in a text
Given an input text either as a string or as a cell array of strings, return a (1 x 26) matrix containing the number of occurren...

quasi 11 anni fa

Risolto


Placing Beads Neatly in a Box
You are given a string of n black and white beads. Your job is to pack them neatly into a square box. "Neatly" in this case mean...

quasi 11 anni fa

Risolto


Find 1's Complement
Find 1's complement of a binary number For Example: x = 10011010 1's complement of x = 01100101

quasi 11 anni fa

Risolto


Sum of Matrix
Sum of Matrix

quasi 11 anni fa

Risolto


Generate the sum of Squares of the given number
|P(n) = 1^2 + 2^2 + ... + n^2| |P(1) = 1| |P(2) = 1 + 4 = 5;| |P(3) = 5 + 9 = 14;| |P(4) = 14 + 16 = 30;|

quasi 11 anni fa

Risolto


Is It a Snake?
Given an m-by-n matrix, return true if the elements of the matrix are a connected "snake" shape from 1 to m*n. Otherwise return ...

quasi 11 anni fa

Risolto


prime to each other
Given two integers n1, n2 greater than 1, find out if they have common divisors or are prime to each other. Return "true" if the...

quasi 11 anni fa

Risolto


multiple of nine?
Given a positive number n, return true if n is a multiple of 9 and false if not. Do not make the division and do not use functio...

quasi 11 anni fa

Risolto


Find elements of set A those are not in set B
Given two sets of data A and B. Find elements of A those are not in set B. ...

quasi 11 anni fa

Risolto


Why the heck are they blinking!?!?
Merry Christmas everyone! Sadly, the lights you've had on your tree for so many years burned out, and it's time to get a new se...

quasi 11 anni fa

Risolto


sparse_matrix
You convert a vector to a sparse matrix. for example *x* =[1 2 3]; output will be *y* = [1 0 0 ...

quasi 11 anni fa

Risolto


Distance a ball travels after throwing vertically
Calculate the total distance *'d'* (in meters) a ball would travel after *'s'* seconds and starting velocity of *'v'* (in m/s). ...

quasi 11 anni fa

Risolto


Matrix of almost all zeros, except for main diagonal
Write a program to input an integer n and build a n-by-n matrix with the numbers 1,2,...,n on the main diagonal and zeros elsewh...

quasi 11 anni fa

Risolto


What's the missing interior angle?
I'm talking about polygons... The sum of the interior angles of a triangle is 180 degrees. The sum of the interior angles of a...

quasi 11 anni fa

Risolto


Determine the full width at half max
Determine the full width at half max of a curve. The full width at half maximum (FWHM) is a parameter which is used for desc...

quasi 11 anni fa

Carica altro