문제를 풀었습니다


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개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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

4개월 전

문제를 풀었습니다


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

6개월 전

문제를 풀었습니다


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

6개월 전

문제를 풀었습니다


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

6개월 전

문제를 풀었습니다


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

6개월 전

문제를 풀었습니다


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

6개월 전

문제를 풀었습니다


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

6개월 전

문제를 풀었습니다


Make a Plot with Functions
Make a plot and test

6개월 전

문제를 풀었습니다


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

6개월 전

문제를 풀었습니다


Kaprekar numbers
Test if the input is a Kaprekar number: <http://mathworld.wolfram.com/KaprekarNumber.html>. Return a logical true or false. ...

6개월 전

문제를 풀었습니다


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

6개월 전

문제를 풀었습니다


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

6개월 전

문제를 풀었습니다


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

6개월 전

문제를 풀었습니다


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

6개월 전

문제를 풀었습니다


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

6개월 전

문제를 풀었습니다


geometric progression
I've modified my <http://uk.mathworks.com/matlabcentral/cody/problems/2800-arithmetic-progression previous program> so that it n...

6개월 전

문제를 풀었습니다


arithmetic progression
I've written a program to generate the first few terms of <https://en.wikipedia.org/wiki/Arithmetic_progression arithmetic progr...

6개월 전

문제를 풀었습니다


Find similar sequences
Another problem inspired by a question on the <http://www.mathworks.com/matlabcentral/answers answers> forum. Given a matrix ...

6개월 전

문제를 풀었습니다


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

6개월 전

문제를 풀었습니다


Largest Geometric Series
Extension of Ned Gulley's wonderful Problem 317. In a geometric series, ratio of adjacent elements is always a constant value. ...

6개월 전

문제를 풀었습니다


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

6개월 전

문제를 풀었습니다


Leaderboard for the Nedball World Cup
At the upcoming inaugural Nedball World Cup, organizers need to track who is in the lead for the coveted Golden Toeplitz trophy,...

6개월 전

더 보기