Solved


IQpuzzler Preparation #2: Detect isolated zeros in a 2D matrix
Return true if any isolated single zeros are present in the input M-by-N matrix (zeros with all adjacent elements being non-zero...

3 months ago

Solved


Sample from random roulette
Given a list of values and their probabilities sample 10,000 values. Example: x = [1 2 3 4 5]; prob = [0.2 0.1 0.4 0.1 0.2] ...

3 months ago

Solved


A kind of decryption
Please convert the vector to letters by referring to the examples below. (eg.1) input vec=[34 1 59] >>> output s='A Z' (eg...

3 months ago

Solved


Find the remainder with the factorial of PRIMES?
* Take a number greater than or equal to 2 and take its primes. e.g. 6 and its primes are 2 3 5 * calculate the factorial of i...

3 months ago

Solved


Decrypt the cypher using XOR encryption (for beginners)
Inspired by Project Euler n°59 Each character on a computer is assigned a unique code and the preferred standard is ASCII (...

3 months ago

Solved


Beauty of Parentheses
Given a string consisting of closed parentheses, form a string array in the following way so that the orders of these parenthese...

3 months ago

Solved


Use a timetable to analyze a train timetable (Part 2)
Oh no, you missed your train to Boston! Find the departure time of the next available train by analyzing the train timetable. Yo...

3 months ago

Solved


Use a timetable to analyze a train timetable (Part 4)
You are analyzing a train timetable (you have some time to kill since you just missed your train!) What is the average daily tri...

3 months ago

Solved


Use a timetable to analyze a train timetable (Part 3)
Oh no, you missed your train to Boston (again?)! How many times can you miss that train today? (In other words, how many Boston ...

3 months ago

Solved


Use a timetable to analyze a train timetable (Part 5)
You are analyzing a train timetable (you have some time to kill since you just missed your train!) How many trains depart each d...

3 months ago

Solved


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

3 months ago

Solved


Create a patchwork matrix
This function will assemble a large matrix out of a number of smaller ones m1, m2, etc., according to a pattern P. If P is 3x5,...

3 months ago

Solved


Greed is good - Simple partition P[n].
Find a simple partition P[n]. E.g. P[10] = 4 + 3 + 2 + 1. There are many solutions, compute just one set. Don't repeat numbers...

3 months ago

Solved


Kaprekar Steps
6174 is the Kaprekar constant. All natural numbers less than 10,000 (except some with same digits) can be reduced to 6174 in the...

3 months ago

Solved


Permutation
How many different words can be formed using all the letters(together) from a given input word? Input is a string.

3 months ago

Solved


Avengers Assemble!
Given matrix with so many zeroes, trim those zeroes and output a matrix joining all nnz elements Example: input = [0 0 0 0 0; 0...

3 months ago

Solved


Chromatic Tuner
Given a frequency, return the number of cents difference between the given frequency and its nearest semitone (in 12-tone equal ...

3 months ago

Solved


Find Rotated Substring
Given a string s1, find if a rotated version of s1 is present in a second string s2. For example, rotated version of some strin...

3 months ago

Solved


Determine the winner of a goofy golf tournament
My brother and father were playing golf one day, and they caught up to a group that was part of a tournament. The group members ...

3 months ago

Solved


remove numbers from a string
check the given string for any numbers.in case one is found,remove it.but the two portions should be separated. if more than one...

3 months ago

Solved


Vector of numbers divisible by 3
* Input(n) - any integer * Output(v) - vector with numbers divisible by 3(exept 0) starting from n to 0 Examples: * n=6...

3 months ago

Solved


Create a 3D rotation matrix
Consider an arbitrary coordinate frame {A}. Consider another coordinate frame {B} which has the same origin as {A} but is rotat...

3 months ago

Solved


Sum two real numbers
It seems easy, but... You cannot use +, -, plus, diff, cumsum, *, prod, times, etc.

3 months ago

Solved


Mix it up!
Given an input string S, return a new string B, that is created by taking one character from the front and then the end iterativ...

3 months ago

Solved


Tic Tac Toe Solver
Create a function that checks n number of tic tac toe boards housed in a 3x3xn matrix where the x's are represented as 1's (and ...

3 months ago

Solved


Repeat middle rows and columns of an array
Given an MxN numeric array (A), return an array (B) in which the middle rows and columns have each been repeated once. It may be...

3 months ago

Solved


Pick the die most likely to win
After discussing Rock, Paper, Scissors, Lizard, Spock in The Simpsons and their Mathematical Secrets, Simon Singh writes that in...

3 months ago

Solved


A Simple Shielding Problem

3 months ago

Solved


Periodic Table II 101.
Given the symbol of an element, return its atomic number. This is the continuation of <http://www.mathworks.com/matlabcentral/co...

3 months ago

Load more