A résolu


FEN to Chess Board
Note: This problem is the reverse, or complement, of Problem 61144 - FEN Chess Notation. Given a FEN (Forsyth-Edwards Notation)...

environ un mois il y a

A résolu


How Long is the Border Between Unitopia and Zerostan?
Two countries, Unitopia (denoted by ones) and Zerostan (denoted by zeros) are engaged in a long-standing dispute: how long is th...

environ un mois il y a

A résolu


Decimal to binary conversion (without using built-in function)
convert the given decimal number to its equivalent binary without using built-in function. * n=18 * out='10010'

environ un mois il y a

A résolu


Generate Golomb's sequence
Generate Golomb's sequence up to the given number. If n=4, then seq = [1, 2, 2, 3, 3, 4, 4, 4] If n=6, then s...

environ un mois il y a

A résolu


Insert structure in a parameter-cell array.
When creating Matlab GUI elements, you can mix value pairs with structures in the list of input arguments, e.g. |uicontrol('t...

environ un mois il y a

A résolu


stem and leaf plot
A stem-and-leaf display is a device for presenting quantitative data in a graphical format, similar to a histogram, to assist i...

environ un mois il y a

A résolu


The other half of the Fibonacci sequence
The <http://mathworld.wolfram.com/FibonacciNumber.html "Fibonacci sequence"> — F = [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144,...

environ un mois il y a

A résolu


CowBoy
A group of cowboys standing in circle form. They have one gun. The first cowboy shoot the cowboy beside him (second one) and giv...

environ un mois il y a

A résolu


Invert a 3D rigid-body transformation
Given an SE(3) matrix representing a rigid-body motion, compute its inverse without using |inv()| or |pinv()| .

environ un mois il y a

A résolu


Yoonir - 03
Find the area of a seven-pointed star inscribed in a circle of radius r.

environ un mois il y a

A résolu


[Master Regular Expression] Validate IP Address
Given a string queryIP, return "IPv4" if IP is a valid IPv4 address, "IPv6" if IP is a valid IPv6 address or "Neither" if IP is ...

environ un mois il y a

A résolu


[Master Regular Expression] Strong Password Checker II
A password is said to be strong if it satisfies all the following criteria: It has at least 8 characters. It contains at l...

environ un mois il y a

A résolu


[Master Regular Expression] Vowel-Consonant Score
You are given a string s consisting of lowercase English letters, spaces, and digits. Let v be the number of vowels in s and c ...

environ un mois il y a

A résolu


[Master Regular Expression] Largest Substring Between Two Equal Character
Given a string s, return the length of the longest substring between two equal characters, excluding the two characters. If ther...

environ un mois il y a

A résolu


[Master Regular Expression] String Matching in an Array
Given an array of string words, return all strings in words that are a substring of another word. You can return the answer in a...

environ un mois il y a

A résolu


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

environ un mois il y a

A résolu


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

environ un mois il y a

A résolu


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

environ un mois il y a

A résolu


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

environ un mois il y a

A résolu


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

environ un mois il y a

A résolu


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

environ un mois il y a

A résolu


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

environ un mois il y a

A résolu


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

environ un mois il y a

A résolu


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

environ un mois il y a

A résolu


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

environ un mois il y a

A résolu


Multiply each matrix element by its row index and add its column index.
Return a matrix the same size as the input, multiply each element by its row index and add its column index. Example: x = [ 1 ...

environ un mois il y a

A résolu


Easy Sequences 39: Perfect Squares in Pascal's Triangle
Consider the 2nd, 3rd and 4th diagonals of the Pascal's Triangle, shown highlighted below: ...

environ un mois il y a

A résolu


Gene Duplication with Sequencing Errors
You are investigating the genome of the bacterium Codex matlabius. A virus that infects C. matlabius is known to insert long, re...

environ un mois il y a

A résolu


Scaling vertically functions
Given a real function by the 1×n array, x, of inputs and the 1×n array, y, of outputs, consider shifting vertically its graph by...

environ un mois il y a

A résolu


Shifting vertically even-degree polynomial's graph by its mean over an interval
Let p be an even-degree polynomial with positive leading coefficient. Consider its vertical translation by shifting its graph by...

environ un mois il y a

Charger plus