Feeds
已解决
Weighted Costs ( Hard )
Different actions have different monetary costs: Fill = $10 , Empty = $5 , Pour = $1 #Note: It's just an example Find the mini...
1 day 前
已解决
Minimal Waste Pouring ( Hard )
Everytime you perform Empty action, water is wasted. Instead of minimizing steps, find the path that minimizes the total volume ...
1 day 前
已解决
Record the Actions ( Medium )
Find the minimum steps to get T units from jugs A and B. Return the sequence of actions as cell array of strings. Available act...
2 days 前
已解决
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, ...
2 days 前
已解决
The Classic 8-5-3 Sharing ( Medium )
You have 3 jugs with capacities [8,5,3]. The 8L jug, the others are empty: [8,0,0]. There is no tap and no drain. You can only p...
2 days 前
已解决
Total Volume Goal ( Medium )
Usually, the target T must be in one jug. In this version, the target T is the sum of water in all N jugs. Example: C = [3,5], ...
2 days 前
已解决
Two Jugs: Minimum Steps ( Medium )
Following the first problem, now you need to find the shortest path. Given two jugs with capacities A and B, find the minimum nu...
2 days 前
已解决
Is it Possible? ( Easy )
In the first part of series, we simplify the problem. Given two jugs with capacities A and B, and a target amount T, determine i...
2 days 前
已解决
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...
2 days 前
已解决
[Master Regular Expression] Keyboard Row
Given an array of strings words, return the words that can be typed using letters of the alphabet on only one row of American ke...
2 days 前
已解决
Count the peaceful queens
In a 5x5 chessboard with a queen of one color (white, say) on the perimeter, one can place 12 black queens on the board such tha...
2 months 前
已解决
3D Plots and Colorbars
Use the matrices X, Y, and Z provided in the function template to create a surface plot. Add a colorbar to the surface plot and ...
2 months 前
已解决
Adding Inset Plots
You can use the axes function to define the position of an empty x/y axis. The position is measured relative the the bottom left...
2 months 前
已解决
Jack O'Lantern
If visualized correctly, the data contained in the matrix A will look like a jack-o'-lantern. Create a function that will visu...
2 months 前
已解决
Plot Line Specifications
Create a line plot for function cos(x) where x is a vector of linearly spaced values going from 0 to input N with an increment o...
2 months 前
已解决
Power Outages Histogram
Create a function that takes power outage data as an input and creates a histogram of the number of outages as a function of Reg...
2 months 前
已解决
Parasitic numbers
Test whether the first input x is an n-parasitic number: <http://en.wikipedia.org/wiki/Parasitic_number>. ( _n_ is the second in...
2 months 前
已解决
Kaprekar numbers
Test if the input is a Kaprekar number: <http://mathworld.wolfram.com/KaprekarNumber.html>. Return a logical true or false. ...
2 months 前
已解决
Polite numbers. N-th polite number.
A polite number is an integer that sums of at least two consecutive positive integers. For example _7 = 3+4_ so 7 is a polite...
2 months 前
已解决
Polite numbers. Politeness.
A polite number is an integer that sums of two or more consecutive positive integers. Politeness of a positive integer is a num...
2 months 前
已解决
nth Rational Number
Return the nth rational number. This is the inverse to Problem 1471. Index of a Rational number The first ten positive rationa...
2 months 前
已解决
Generate a Parasitic Number
This problem is the next step up from Problem 156. Rather than determining if an input is a parasitic number, you will be asked ...
2 months 前
已解决
Approximation of Pi (vector inputs)
Pi (divided by 4) can be approximated by the following infinite series: pi/4 = 1 - 1/3 + 1/5 - 1/7 + ... For a given numbe...
2 months 前
已解决
geometric progression
I've modified my <http://uk.mathworks.com/matlabcentral/cody/problems/2800-arithmetic-progression previous program> so that it n...
2 months 前
已解决
arithmetic progression
I've written a program to generate the first few terms of <https://en.wikipedia.org/wiki/Arithmetic_progression arithmetic progr...
2 months 前
已解决
Find similar sequences
Another problem inspired by a question on the <http://www.mathworks.com/matlabcentral/answers answers> forum. Given a matrix ...
2 months 前
已解决
Generate Square Wave
Generate a square wave of desired length, number of complete cycles and duty cycle. Here, duty cycle is defined as the fraction ...
2 months 前
已解决
Largest Geometric Series
Extension of Ned Gulley's wonderful Problem 317. In a geometric series, ratio of adjacent elements is always a constant value. ...
2 months 前
已解决
Clueless - Lord Ned in the Game Room with the Technical Computing Language
[Warning: this is a nontrivial programming problem] Worried about the decline in reasoning skills in the clueless populace of...
2 months 前











