Gelöst


Leftovers? Again?!
I am thinking of a positive number X. To determine what number I am thinking of, I will give you two 1xN vectors. The first ve...

4 Tage vor

Gelöst


Why the heck are they blinking!?!?
Merry Christmas everyone! Sadly, the lights you've had on your tree for so many years burned out, and it's time to get a new se...

4 Tage vor

Gelöst


Sleeping Queens 1
My youngest daughter received a card game named Sleeping Queens for Christmas this year, and has been playing it nearly non-stop...

4 Tage vor

Gelöst


Fractal: area and perimeter of Koch snowflake
Starting from an equilateral triangle with side 's', what is the area and perimeter of Koch snowflake at n'th recursive iteratio...

4 Tage vor

Gelöst


Determine when snow started
R.P. Agnew posed the following problem: It starts snowing in the morning and continues steadily throughout the day. A snowplow t...

4 Tage vor

Gelöst


The cake is a lie...
You're hosting a birthday party with a large number of screaming children. Fortunately, you have a gigantic sheet cake in front...

4 Tage vor

Gelöst


Lights Out 1 - 5x5, 3 moves
<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

4 Tage vor

Gelöst


Sudoku Solver - Standard 9x9
Solve a Standard 9x9 <http://en.wikipedia.org/wiki/Sudoku Sudoku>. Values 1 thru 9 occur in each row, column, and the nine non-o...

4 Tage vor

Gelöst


Castling-03
Given the position of different chess pieces on the chessboard, figure out whether castling is valid or not in the next move (wh...

11 Tage vor

Gelöst


Castling-02
This is a follow up of problem <https://www.mathworks.com/matlabcentral/cody/groups/1/problems/45329-castling-01> Given...

11 Tage vor

Gelöst


Castling-01
Given the position of only one player's chess pieces(some of them) on the chessboard, figure out whether castling is valid or no...

11 Tage vor

Gelöst


En passant - 01
This is white's turn. The player moves his pawn. The pawn's previous and current positions are given. Determine whether th...

11 Tage vor

Gelöst


King's Cage
Given the position of the king on the chessboard, determine the minimum number of steps it'll require to reach the destination. ...

11 Tage vor

Gelöst


Can the knight take out the pawn?
* position of knight = k * position of pawns = p can the knight take out those pawns? * k='Nf4' * p={'g6','g7'} then...

11 Tage vor

Gelöst


Checkmate-02
This is an extension of the problem <https://www.mathworks.com/matlabcentral/cody/problems/45238-checkmate> If the king is in...

11 Tage vor

Gelöst


Checkmate
* The positions of different chess pieces are given in a cell *p* . * The position of the king is given as *x* Determine i...

11 Tage vor

Gelöst


Count the ways to draw non-intersecting chords between points on a circle
There are 9 ways to draw non-intersecting chords between four points on the perimeter of a circle (including no chords at all). ...

11 Tage vor

Gelöst


Fill a rectangle with 1x1 and 2x2 tiles
A 3x2 rectangle can be filled with 1x1 and 2x2 tiles in three ways: The colors merely distinguish the sizes of the tiles. A 3...

11 Tage vor

Gelöst


Easy Sequences 5: Project Euler Problem 1 - Again!
We are all familiar with Project Euler Problem 1. This time let's try it on bigger multiples and larger range. Find the sum of ...

11 Tage vor

Gelöst


Easy Sequences 6: Coefficient sums of derivatives
Consider the polynomial function and its first-order derivative . The sums of the coefficients of P and P', are and , respecti...

11 Tage vor

Gelöst


Easy Sequences 11: Factorial Digits without Trailing Zeros
Here is an easy one... It is not difficult to count the number of digits of the factorial of a given number. For example for 'n...

11 Tage vor

Gelöst


Easy Sequences 9: Faithful Pairs
A "faithful number" is a non-prime number that is one less or one more than some prime number but not both. For example, for num...

11 Tage vor

Gelöst


Easy Sequences 12: 50th Prime
Write a function that outputs the th prime after a given number . For example, the th prime after is . NOTE: If itself is pr...

11 Tage vor

Gelöst


Find all vampire fangs
A vampire number is a number v that is the product of two numbers x and y such that the following conditions are satisfied: at ...

15 Tage vor

Gelöst


Multivariate polynomials - sort monomials
In <https://www.mathworks.com/matlabcentral/cody/problems/44260-multidimensional-polynomials-convert-monomial-form-to-array Prob...

15 Tage vor

Gelöst


Multivariate polynomials - overload multiplication
Problems <https://www.mathworks.com/matlabcentral/cody/problems/44260-multivariate-polynomials-convert-monomial-form-to-array 44...

15 Tage vor

Gelöst


Multivariate polynomials - convert monomial form to array
In <https://www.mathworks.com/matlabcentral/cody/problems/44259-product-of-two-multidimensional-polynomials Problem 44259> I ask...

15 Tage vor

Gelöst


Product of two multivariate polynomials
MATLAB <https://www.mathworks.com/help/matlab/polynomials.html has a few functions> for creating and manipulating single-variabl...

15 Tage vor

Gelöst


Clockwise or Counterclockwise
Given a list of 2-d points defining the vertices of a polygon, determine whether these points are sorted clockwise. The input...

15 Tage vor

Gelöst


Spherical radius given four points
Determine the radius of a sphere provided four non-coplanar points on the surface of the sphere. pts = [x1 y1 z1; x...

15 Tage vor

Mehr laden