Community Profile

photo

Farhad


Con actividad desde 2012

Estadísticas

  • Commenter
  • Solver

Ver insignias

Content Feed

Ver por

Resuelto


Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: $99,999.99. E...

más de 11 años hace

Resuelto


Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

más de 11 años hace

Resuelto


Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

más de 11 años hace

Resuelto


Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

más de 11 años hace

Resuelto


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

casi 12 años hace

Resuelto


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

alrededor de 12 años hace

Resuelto


What is the next step in Conway's Life?
Given a matrix A that represents the state of <http://en.wikipedia.org/wiki/Conway's_Game_of_Life Conway's game of Life> at one ...

alrededor de 12 años hace

Resuelto


Get the area codes from a list of phone numbers
Given a string of text with phone numbers in it, return a unique'd cell array of strings that are the area codes. s = '508-647...

alrededor de 12 años hace

Resuelto


Knight's Tour Checker
Given a matrix a, determine whether or not a legal <http://en.wikipedia.org/wiki/Knight's_tour knight's tour> is present. The kn...

alrededor de 12 años hace

Resuelto


Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

alrededor de 12 años hace

Resuelto


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

alrededor de 12 años hace

Resuelto


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

alrededor de 12 años hace

Resuelto


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

alrededor de 12 años hace

Resuelto


Poker Series 05: isStraight
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is t...

alrededor de 12 años hace

Resuelto


Poker Series 04: isFlush
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is t...

alrededor de 12 años hace

Resuelto


Poker Series 03: isFullHouse
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is t...

alrededor de 12 años hace

Resuelto


Poker Series 02: isQuads
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is to...

alrededor de 12 años hace

Resuelto


Poker Series 01: isStraightFlush
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is t...

alrededor de 12 años hace

Resuelto


Longest Divisor Run
Given the vector a, find the longest run of consecutive numbers that can be evenly divided by the same number d where d > 1. ...

alrededor de 12 años hace

Resuelto


Word Counting and Indexing
You are given a list of strings, each being a list of words divided by spaces. Break the strings into words, then return a maste...

alrededor de 12 años hace

Resuelto


Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

alrededor de 12 años hace

Cargar más