Risolto


Sum of diagonals elements of a matrix
Given a matrix, return the sum of all the elements across the diagonals. E.g. A = [1 2 3; 4 5 6; 7 8 9;...

oltre 10 anni fa

Risolto


Who is the baby and who is the daddy in this family?
Given an array of numbers that shows the characteristcs of all family members, find who is the baby and who is daddy in this fam...

oltre 10 anni fa

Risolto


is the number happy?
test is a given integer number is Happy of not? answer 1 if yes or 0 is no

oltre 10 anni fa

Risolto


Strange Number Algorithms
Three integer numbers will be provided to you. Write a function to Step1: Multiply first number by 3. Step2: Add 6 with t...

oltre 10 anni fa

Risolto


is this number Munchhausen Narcissistic?
in this problem, simply return 1 if a supplied number is Munchhausen narcissistic or 0 if not. eg 153 is narcissistic but not...

oltre 10 anni fa

Risolto


persistant sum
There will be 9 tests for this problem. In each test you will be provided with 2 integers n=[n1,n2], where n2 is equal to t...

oltre 10 anni fa

Risolto


A matrix of extroverts
Now that the introverts have had their script, the extroverts spoke up (naturally!) and demanded one as well. You will be given...

oltre 10 anni fa

Risolto


A matrix of introverts
You are given a matrix full of numbers who happen to be very shy. Write a MATLAB function that will put a square of zeros aroun...

oltre 10 anni fa

Risolto


Narcissistic number ?
Inspired by Problem 2056 created by Ted. In recreational number theory, a narcissistic number is a number that is the sum of ...

oltre 10 anni fa

Risolto


Generate this matrix
Generate the following matrix. n = 2; out = [-4 -3 -2 -1 0 -3 -2 -1 0 1 -...

oltre 10 anni fa

Risolto


Parallel vectors
Return true or false depending on whether 2 vectors are parallel or not. Vectors can be 2 or 3 dimensional. The origin is not c...

oltre 10 anni fa

Risolto


The prisoner
"We want information, information, information." "Who are you?" Input can be a string or a number (array).

oltre 10 anni fa

Risolto


surface of parallelogram
Given 2 vectors of each 3 elements, determine the surface of the parallelogram which can be created from these 2 vectors.

oltre 10 anni fa

Risolto


Split a given string from the first instance of a given character
A simple operation to split a given string into two substrings at the point where the desired character is first found. e.g. ...

oltre 10 anni fa

Risolto


average for three points
how to calculate the average (for each three values of y) y=[2 3 5 3 4 2 3 4 5 3 2 7 8 6 5 5 4 3 3 3 2 ] you ...

oltre 10 anni fa

Risolto


Concatenate strings
concatenate a variable number of input strings to produce one outputstring

oltre 10 anni fa

Risolto


converting decimal to base X
Convert numbers from base 10 to the base X. X is specified as an argument. Examples: number 26 to base X X = 2: 26 = ...

oltre 10 anni fa

Risolto


subsequences of the same numbers
Finding the largest consecutive subsequences of the same numbers (the return value is itself subsequence). For example: 1....

oltre 10 anni fa

Risolto


Convert matrix to 3D array of triangular matrices
Given a 2D numeric array x in which each column represents the vectorized form of an upper triangular matrix, return a 3D array ...

oltre 10 anni fa

Risolto


Kaggle: Reverse Game of Life - Periods of Oscillators
<http://www.kaggle.com/c/conway-s-reverse-game-of-life Kaggle's Conway's Reverse Game of Life> contest inspires this Period of L...

oltre 10 anni fa

Risolto


Count decimal digits of a number
* Given an integer number you have to return the number of its digits. * For example 248 has 3 digits and 1589 has 4 digits ...

oltre 10 anni fa

Risolto


Simple Caesar Cypher - shift encrypt a message given an index number
A Caesar cypher is a simple shift encryption method. Your goal is to create a function that allows a user to input a string and ...

oltre 10 anni fa

Risolto


Check if equal
Return true if all the elements of an nD array are equal, false otherwise.

oltre 10 anni fa

Risolto


Grid traversal
Given a line defined by (x1,y1) & (x2,y2),return the number of squares that the line crosses on the grid (a square is 1x1). ...

oltre 10 anni fa

Risolto


Add a row of zeros on top of a matrix
Given a matrix, insert a row of zeros as the top row.

oltre 10 anni fa

Risolto


Finding neighbors of [-1:1] in a matrix....
Hello All! Well I found this one fun to figure out, all you have to do is make a matrix of 1's or 0's (true or false) that sh...

oltre 10 anni fa

Risolto


Kaggle: Reverse Game of Life - Single Move to One Cell Case
<http://www.kaggle.com/c/conway-s-reverse-game-of-life Kaggle's Conway's Reverse Game of Life> contest inspires this Single Reve...

oltre 10 anni fa

Risolto


Spot the outlier
All points except for one lie on a line. Which one is the outlier? Example: You are given a list of x-y pairs in a column ...

oltre 10 anni fa

Risolto


Find a subset that divides the vector into equal halves
Given a vector x, return the indices to elements that will sum to exactly half of the sum of all elements. Example: Inpu...

oltre 10 anni fa

Risolto


Make a run-length companion vector
Given a vector x, return a vector r that indicates the run length of any value in x. Each element in r shows how many times the ...

oltre 10 anni fa

Carica altro