Solved


Create an 'arrow-head" matrix
Write a function that when given an odd number, produces an arrow-head function pointing to the right. Examples n = 3 ...

4 days ago

Solved


De-primed
Write a function that will multiply every prime number in the array or matrix by two, leaving all other numbers the same, and re...

4 days ago

Solved


Rolling maximums above a threshold
You are given either a vector or a 2-D matrix M and a threshold value of t. Write a script that will calculate how many times t...

4 days ago

Solved


Regex match
Many regular expression engines have a simple function to quickly know whether a regular expression entirely matches a string or...

4 days ago

Solved


Wheat on a chessboard pt 1
If a chessboard were to have wheat placed upon each square such that one grain were placed on the first square and each successi...

4 days ago

Solved


Multiply Column
Given two input, one matrix and one scalar number For example A is a matrix given A = [ 1 2 2 5 2 5 2 3 4 6...

4 days ago

Solved


Pell numbers
Find the nth pell number <https://en.wikipedia.org/wiki/Pell_number>

4 days ago

Solved


Sum the elements in either diagonal of a square matrix
Sum the elements of a square matrix that lie on either the major diagonal or anti-diagonal. (Include all elements that are part ...

4 days ago

Solved


Reindex a vector (★★)
(copy of Prob. 676) You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX h...

4 days ago

Solved


generate the matrix
given 3 inputs e.g [2,3,4] -- generate a matrix like below -- [2 2 0 0 0 0 0 0 0; 2 2 0 0 0 0 0 0 0; 0 0 3 3 3 0 0 0 0; 0 0...

4 days ago

Solved


Easy Sequences 23: Hat Guessing Game!
Consider the following Game Show: Hats, with numbers written on each, were placed on the heads of the participants. Participant...

4 days ago

Solved


Armstrong Number
Write a function name armstrong_check that checks whether the given input is an Armstrong Number or not. It returns logical True...

4 days ago

Solved


Edges of a n-dimensional Hypercube
Return the number of edges on an <http://en.wikipedia.org/wiki/Hypercube _n_-dimensional hypercube> (with an integer n &ge; 0). ...

4 days ago

Solved


Binary Coder
Take an input number and print the binary value of this number.

4 days ago

Solved


Find the definite integral of various linear functions
A definite integral had a minimum and maximum limit. When you solve this type of problem you must use both quad and the trapz fu...

4 days ago

Solved


The Ultimate Water Challenge ( Expert )
Description: In the previous problems, you were given a target T and asked to find the minimum number of steps to reach it. ...

4 days ago

Solved


Find best domino orientation
Given a list of pairs, find the orientation they should be placed in a line, such that the sum of the absolute values of the dif...

4 days ago

Solved


Choose the best fitting dominoes
You will be given a cell array of nx2 matrices. Choose one row from each matrix. These are the ordered pairs that will be placed...

4 days ago

Solved


Rotate and display numbered tile
Imagine a square tile with four numbers on it, one on each edge. We will call these edges north, east, south, and west. If th...

4 days ago

Solved


Find perfect placement of non-rotating dominoes (easier)
Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

4 days ago

Solved


Scoring for oriented dominoes
Given a list of ordered pairs, and the order they should be placed in a line, find the sum of the absolute values of the differe...

4 days ago

Solved


Compute the bubble popper fidget spinner sequence
A fidget spinner is a toy made of multiple lobes that pivot on a ball bearing. In some, the lobes hold bubble poppers, or rubber...

4 days ago

Solved


List numbers such that every sum of consecutive positive integers ending in those numbers is not prime
The sequence in question in this problem involves numbers such that all sums of consecutive positive integers ending with are ...

4 days ago

Solved


Compute the largest number whose prime factors sum to n
This problem deals with a sequence whose tenth term is 36 because the prime factors of 36 (2, 2, 3, 3) sum to 10. The number 32 ...

4 days ago

Solved


List the Moran numbers
The quotient of a Moran number and its digit sum is prime. For example, 117 and 481 are Moran numbers because 117/(1+1+7) is 13 ...

4 days ago

Solved


List the cuban primes
The number 61 is a cuban prime because it is prime and the difference two cubes, 64 and 125. Write a function to list the cuba...

4 days ago

Solved


The Generalized N-Jug Water Pouring Problem ( Hard )
Description: You are given N water jugs with maximum capacities specified in a vector C = [ c1, c2, c3,.., c_n]. Initially, all...

4 days ago

Solved


Weighted Costs ( Hard )
Different actions have different monetary costs: Fill = $10 , Empty = $5 , Pour = $1 #Note: It's just an example Find the mini...

4 days ago

Solved


Minimal Waste Pouring ( Hard )
Everytime you perform Empty action, water is wasted. Instead of minimizing steps, find the path that minimizes the total volume ...

4 days ago

Solved


The Broken Jug: Constrain ( Hard )
One of your jugs is "broken": it can not be Emptied to the drain. It can only be Filled or Poured to another jug. Input: C, T, ...

4 days ago

Load more