Gelöst


The Deadly Sin
Melvyn and Banner are fighting over chocolates. Melvyn has X chocolates, while Banner has Y. Whoever has a lesser number of choc...

mehr als 5 Jahre vor

Gelöst


Counting Squares
An algorithm starts with a single square and on each of its next iterations adds new squares all around the outside as shown bel...

mehr als 5 Jahre vor

Gelöst


Five Fingers
A little girl has just learnt how to count from 1 to N using the five fingers of her left hand as follows. She starts by calling...

mehr als 5 Jahre vor

Gelöst


Seperate array to small section according to its index position
Given a integer n, we can generate a sequence [0,1,2,3,4,..., 2^n-1], then we separate it to two sequence according to their ind...

mehr als 5 Jahre vor

Gelöst


New Matrix with vector addition on diagonal
consider 2 vectors x=[1 2 3] y=[4 5 6] then generate a new Matrix, where Addition of x & y will be diagonal Elements...

mehr als 5 Jahre vor

Gelöst


Find the area of a triangle having vertices (A,B), (C,D), and (E,F)
Find the area of a triangle using if we have the three vertices of the triangle

mehr als 5 Jahre vor

Gelöst


Pizza order
A pizza order by phone in diameter d1, pizza will be make only in diameter d2. Return the pizza pieces p should be make.(pizza ...

mehr als 5 Jahre vor

Gelöst


Amicable numbers
Test whether two numbers are <https://en.wikipedia.org/wiki/Amicable_numbers amicable>, meaning that the sum of the proper divis...

mehr als 5 Jahre vor

Gelöst


Lunar Arithmetic (Addition)
<https://oeis.org/A087061 OEIS link for a description of lunar arithmetic> Simply take the larger digit. Example 1: ...

mehr als 5 Jahre vor

Gelöst


Make an anonymous function that has variable output
Make a anonymous function that has variable output. f = @(x)... the following equation→equation(s) as followed has(ve) ...

mehr als 5 Jahre vor

Gelöst


Optimization of cylinder surface area
Optimization of a cylinder surface area. What are the best parameters (radius and height) to get the minimum cylinder surface a...

mehr als 5 Jahre vor

Gelöst


Cody Problems in French : Trouvez la logique Pt.1
On rentre x = 4 et il en sort y = 160. Trouvez la logique entre x et y, aidez-vous de la test suite. Bon courage. P.S: L'...

mehr als 5 Jahre vor

Gelöst


X O X O
On a noughts and crosses board, how many possible unique combinations are there given a square grid of length n? Assumptions/...

mehr als 5 Jahre vor

Gelöst


X O X Oh!
_This follows on from problem 44850 - X O X O_ <https://www.mathworks.com/matlabcentral/cody/problems/44850-x-o-x-o> On a...

mehr als 5 Jahre vor

Gelöst


Mean number of letters per word (Easy)
Given a character array, s, representing a sentence, return a, the arithmetic mean of the number of letters per word in the give...

mehr als 5 Jahre vor

Gelöst


Mean number of letters per word (Hard)
The previous problem in this series is <https://www.mathworks.com/matlabcentral/cody/problems/44852-mean-number-of-letters-per-w...

mehr als 5 Jahre vor

Gelöst


Permutation Via Multiplication
Given two numbers a and b, determine if the product ab is a permutation of the digits of a. For example, this is always true for...

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


Create a 3D rotation matrix
Consider an arbitrary coordinate frame {A}. Consider another coordinate frame {B} which has the same origin as {A} but is rotat...

mehr als 5 Jahre vor

Gelöst


Rearrange the given matrix to have all its zeros climb up to the top of each column - using for loops.
Given a matrix x, *using loops only* return a matrix y, in which all the zeros have "climbed" up to the top. That is, any zeros ...

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


Float like a cannonball
Given gravity on earth (g=9.81 [m/s/s]) find the distance s [m] by a cannonball propelled at a speed of u [m/s] from the origin ...

mehr als 5 Jahre vor

Gelöst


What time can I drive after drinking?
At T o'clock, after a hard day of Matlab, I immediately start drinking and treat myself to N pints of tasty beer. Each beer I dr...

mehr als 5 Jahre vor

Gelöst


An n-sided regular polygon is drawn within a circle whose radius is 'r', what will be the area of the polygon?
area of a polygon is p*a/2. where, p is the perimeter and a is the apothem i.e. the normal distance from center to any of the ...

mehr als 5 Jahre vor

Gelöst


The length of the equal sides of an isoceles triangle is 'a'.For all the possible (integer) values of the remaining side,find the associated angles between the two equal sides.
the remaining side may have many possible values.only assume integer ones for simplicity.

mehr als 5 Jahre vor

Gelöst


Determine whether a given point is inside or outside a polygon
A closed polygon may be described by an N x 2 array of nodes, where the last node and the first node are the same. Each row of ...

mehr als 5 Jahre vor

Gelöst


find subscripts from linear index
a matrix and the linear index of an element is given as input. find the subscripts of that element. if linear index=3 , outp...

mehr als 5 Jahre vor

Gelöst


cofactor matrix
given a matrix, find its cofactor matrix <https://en.wikipedia.org/wiki/Minor_(linear_algebra)#Inverse_of_a_matrix>

mehr als 5 Jahre vor

Gelöst


Wythoff Sequence
Find the lower Wythoff sequence up to n. For more information, <https://oeis.org/A000201>

mehr als 5 Jahre vor

Gelöst


Remove duplicated triangles
Input T is a triangulation (triplet list of indices -positive integers-, each index refering to a vertex number in a correspondi...

mehr als 5 Jahre vor

Mehr laden