Community Profile

photo

RC


Last seen: 10 mesi fa Attivo dal 2014

Statistiche

  • Solver

Visualizza badge

Content Feed

Visto da

Risolto


Number of 1s in the Binary Representation of a Number
*Description* Return the number of 1s in the (unsigned integer) binary representation of a number. This function should be ab...

oltre 9 anni fa

Risolto


Find the biggest empty box
You are given a matrix that contains only ones and zeros. Think of the ones as columns in an otherwise empty floor plan. You wan...

oltre 9 anni fa

Risolto


How long is the longest prime diagonal?
Stanislaw Ulam once observed that if the counting numbers are <http://en.wikipedia.org/wiki/Ulam_spiral arranged in a spiral>, t...

oltre 9 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 9 anni fa

Risolto


Implement simple rotation cypher
If given a letter from the set: [abc...xyz] and a shift, implement a shift cypher. Example: 'abc' with a shi...

oltre 9 anni fa

Risolto


Given a window, how many subsets of a vector sum positive
Given a vector: [1 0 -1 3 2 -3 1] and a window of 2, A sliding window would find: 1 + 0 = 1 0 - 1 = -1 ...

oltre 9 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 9 anni fa

Risolto


Convert a vector into a number
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

oltre 9 anni fa

Risolto


Flag largest magnitude swings as they occur
You have a phenomenon that produces strictly positive or negative results. delta = [1 -3 4 2 -1 6 -2 -7]; Marching thr...

oltre 9 anni fa

Risolto


Sums with Excluded Digits
Add all the integers from 1 to n in which the digit m does not appear. m will always be a single digit integer from 0 to 9. no...

oltre 9 anni fa

Risolto


How many trades represent all the profit?
Given a list of results from trades made: [1 3 -4 2 -1 2 3] We can add them up to see this series of trades made a profit ...

oltre 9 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 9 anni fa

Risolto


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

oltre 9 anni fa

Risolto


Subset Sum
Given a vector v of integers and an integer n, return the the indices of v (as a row vector in ascending order) that sum to n. I...

oltre 9 anni fa

Risolto


Find the two most distant points
Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...

oltre 9 anni fa

Risolto


Increment a number, given its digits
Take as input an array of digits (e.g. x = [1 2 3]) and output an array of digits that is that number "incremented" properly, (i...

oltre 9 anni fa

Risolto


Find state names that end with the letter A
Given a list of US states, remove all the states that end with the letter A. Example: Input s1 = 'Alabama Montana Nebras...

oltre 9 anni fa

Risolto


Tic Tac Toe FTW
Given a tic tac toe board: * 1 represents X * 0 represents empty. * -1 represents O It is X's move. If there is an imme...

oltre 9 anni fa

Risolto


Connect Four Win Checker
<http://en.wikipedia.org/wiki/Connect_Four Connect Four> is a game where you try to get four pieces in a row. For this problem, ...

oltre 9 anni fa

Risolto


Read a column of numbers and interpolate missing data
Given an input cell array of strings s, pick out the second column and turn it into a row vector of data. Missing data will be i...

oltre 9 anni fa

Risolto


Reverse Run-Length Encoder
Given a "counting sequence" vector x, construct the original sequence y. A counting sequence is formed by "counting" the entrie...

oltre 9 anni fa

Risolto


Text processing - Help Johnny write a letter home from camp
Johnny overuses the word 'great'. Write a script that will help him with this and future letters. If a sentence contains more ...

oltre 9 anni fa

Risolto


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

oltre 9 anni fa

Risolto


inner product of two vectors
inner product of two vectors

oltre 9 anni fa

Risolto


Function Iterator
Given a handle fh to a function which takes a scalar input and returns a scalar output and an integer n >= 1, return a handle f...

oltre 9 anni fa

Risolto


Function composition
Write a function that accepts two function handles f and g and returns the composition h. That is, h = (f o g)(x) = f(g(x)) ...

oltre 9 anni fa

Risolto


Solve the Sudoku Row
*Description* A simple yet tedious task occurs near the end of most Sudoku-solving algorithms, computerized or manual. The ta...

oltre 9 anni fa

Risolto


Pattern matching
Given a matrix, m-by-n, find all the rows that have the same "increase, decrease, or stay same" pattern going across the columns...

oltre 9 anni fa

Risolto


Return a list sorted by number of occurrences
Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

oltre 9 anni fa

Risolto


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

oltre 9 anni fa

Carica altro