Solved


Given a matrix A (size m x n) create a matrix B which consists of matrix A sorted in descending order by columns and then by rows.
--------------- A= [ 2 6 -3 7 12 0 -12 5 1] --------------- B= [12 7 1 6 2 0 5 -3 ...

6 years ago

Solved


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

6 years ago

Solved


Given a matrix A return a vector of the product of the elements in each column using a loop without using prod.
--------------------- for m: 3 1 3 3 10 1 9 1 9 4 1 4 5 6 5 ...

6 years ago

Solved


random picture with random colours
write a function which creates a random(x,y) matrix with random RGB colours for example create_pic(5,5) gives us a 3d matrix. ...

6 years ago

Solved


Count from 0 to N^M in base N.
Return an array of numbers which (effectively) count from 0 to N^M-1 in base N. The result should be returned in a matrix, with ...

6 years ago

Solved


Distance walked 3D
suppose you go from x-y-z coordinates [3,4,2] to [0,0,2] to [0,1,2] to [1,1,2], to [1,1,20] then you walked 25 units of distance...

6 years ago

Solved


Rotate and display numbered tile
Imagine a square tile with four numbers on it, one on each edge. We will call these edges north, east, south, and west. If th...

6 years ago

Solved


Cantor counting
Find the nth cantor's rational number. the sequence is given below in the link. Sequence: 1/1,1/2,2/1,3/1,2/2,1/3,1/4... ... .....

6 years ago

Solved


Don't be mean. Be nice!
For this problem, you will be given a range of single digits R, and a separate number K. You job is to calculate the mean of al...

6 years ago

Solved


Dots in a Sphere
Return how many integer grid points there are inside a 3D sphere of radius _r_ centred at (0,0,0) (including points on the edge)...

6 years ago

Solved


Valid Chess Moves
Using <http://en.wikipedia.org/wiki/Algebraic_chess_notation standard Algebraic notation> ('' for a pawn), given previous move a...

6 years ago

Solved


Area-04
The dimension of a rectangle is given. There are two circles of equal size that are inscribed inside it.The circles are tangent ...

6 years ago

Solved


Area-03
There are two circles of equal size are inscribed inside a square. They are tangent to each other. <https://serving.photos.ph...

6 years ago

Solved


Area-02
Given the radius of the circle inscribed in a square, find the area of the square that can be fitted perfectly in the corner. ...

6 years ago

Solved


Area-01
Given the radius of the circle inscribed in a square, find the area that is not bounded by the circle but inside the square. ...

6 years ago

Solved


Area-06
The length of the side of a square is given. Draw 4 quarter-circles inside the square from 4 corners with a radius equal to t...

6 years ago

Solved


lucky
check whether n is a lucky number <https://oeis.org/A000959>

6 years ago

Solved


Grazing-01
A cow is tied to an outside corner of a rectangular barn of size (a,b) with a rope of length l. What is the maximum area the cow...

6 years ago

Solved


Find the shortest distance between a point and a straight line.
Given the Cartesian coordinates of three points A, B and C (in a flat Euclidean space), find the shortest distance between the ...

6 years ago

Solved


Poker Series 06: isThreeKind
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is t...

6 years ago

Solved


Poker Series 05: isStraight
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is t...

6 years ago

Solved


Poker Series 04: isFlush
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is t...

6 years ago

Solved


Poker Series 03: isFullHouse
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is t...

6 years ago

Solved


Poker Series 02: isQuads
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is to...

6 years ago

Solved


Poker Series 01: isStraightFlush
The Poker Series consists of many short, well defined functions that when combined will lead to complex behavior. Our goal is t...

6 years ago

Solved


Acid and water
&#9878; &#9878; &#9878; &#9878; &#9878; &#9878; &#9878; &#9878; Assume that there is a 100 liter tank. It is initially fi...

6 years ago

Solved


5th Time's a Charm
Write a function that will return the input value. However, your function must fail the first four times, only functioning prope...

6 years ago

Solved


Dots in a Circle
Return how many integer grid points there are inside a circle of radius _r_ centred at (0,0) (including points on the edge). ...

6 years ago

Solved


Volume difference between Ellipsoid and Sphere
Given an ellipsoid of semi principal axis (a,b,c) find the volume of the difference between this ellipsoid and the sphere with...

6 years ago

Solved


Spiral In
Create an m by n matrix filled with sequential integers starting from 1 and arranged in a counterclockwise spiral that hugs the ...

6 years ago

Load more