Solved


MinMax
* x=[2 4 3 1 6 4 6] * output , y=[1 6 2 4 3] here,y(1) is the minimum of x, y(2) is the maximum of x, y(3) is the 2nd mini...

4 years ago

Solved


Count the number of folds needed to pack a large sheet
In a certain paper factory, large sheets of paper are being made every day. Before sending the sheets for shipment, they have to...

4 years ago

Solved


Create a matrix map of increasing safety levels
The sole nuclear power plant at Grid City suddenly had a meltdown. Luckily, the plant was designed to be in full automation, so ...

4 years ago

Solved


Minimal Path - 01
Given a matrix, find the minimal path sum from the top left to the bottom right by only moving to the right and down. For exa...

4 years ago

Solved


Sky full of stars - 01
Draw a right triangle with asterisks of size n. For example, for n=5 '* ' '** ' '*** ' '**** ' ...

4 years ago

Solved


Kissing Circles-01
Three circles are mutually tangent to each other and also to a line. find the radius of the smallest circle. The radius of th...

4 years ago

Solved


Sieve of Eratosthenes
Find the nth lucky prime number. <https://planetmath.org/luckyprime> can u find a way for large n?

4 years ago

Solved


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

4 years ago

Solved


MinMax mapping
Given a matrix, map all the elements within a given interval. For example, a=[ 2 5 10] mapped in the interval [1,2] ...

4 years ago

Solved


Sum! Sum! Sum!
Calculate the sum of the sequence up to nth term >> a,aa,aaa,aaaa,... 2,22,222,2222,... [for a=2]

4 years ago

Solved


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

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

4 years ago

Solved


3rd side of a Triangle
Given two sides of a triangle, find the minimum and maximum possible area of the triangle. the length of the third side has t...

4 years ago

Solved


Abelian Sandpile - 02
Generate a matrix like Abelian Sandpile where the four corner element is n. For example, n=4 [4 3 2 1 ...

4 years ago

Solved


Fault in our Stars - 02
Create a window pattern with h-horizontal bars and v-vertical bars. For example, for h=4,v=4 '**********' '* ...

4 years ago

Solved


Fault in our Stars - 01
Create a ladder pattern with n-steps and b-width. For example, For n=2, b=5 -- the ladder would look like - '* ...

4 years ago

Solved


PEMDAS test
Create the function that will return the following expression for x and y. <<https://i.ibb.co/RHWyzrv/Code-Cogs-Eqn-1.gif>> ...

4 years ago

Solved


Generate n equally spaced "intervals" between -x and x
Given n and x, return a list of numbers (in ascending order) that divides the interval [-x x] into n equal-length intervals. ...

4 years ago

Solved


Create a vector of the first n naturnal numbers
If n = 7, your program should return a vector y, where y = [1 2 3 4 5 6 7].

4 years ago

Solved


Create logarithmically spaced values
Given three numbers a,b,n with b>a, create a vector y with n logarithmic spaced values between 10^a and 10^b. Thus, if a = -2, ...

4 years ago

Solved


Element-wise vector product
Given two vectors x and y, compute their element-wise product z. Thus, if x = [1 3 5] and y = [0.5 -1 2], then z = [1*0.5...

4 years ago

Solved


Vector raised to a power (element-wise)
Given a vector A and a number x, raise each element of the vector to the power of x. Thus, if A = [2 5 7 1] and x = 0.5, then ...

4 years ago

Solved


Create a vector with n repeated values of a number x
If x=3 and n=7 then the vector y would be y=[3 3 3 3 3 3 3]

4 years ago

Solved


Create a vector of n alternating ones and zeros
Given n, your output should be a vector y of numnbers such that the first number is 1 and the numbers following it alternate bet...

4 years ago

Solved


Create a vector of the first n odd numbers
If n = 10, your program should return a vector y, where y = [1 3 5 7 9 11 13 15 17 19].

4 years ago

Solved


Compute the missing quantity among P, V, T for an ideal gas
Consider 100 mol of helium gas at a certain pressure (P), volume (V), and temperature (T). Assuming that the ideal gas law appli...

4 years ago

Solved


Cody problems in French : Trouvez la logique Pt.2
Trouvez la logique entre x et y, aidez-vous de la test suite. Bon courage. P.S: L'utilisation de "^" est de nouveau fortement...

4 years ago

Solved


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

4 years ago

Solved


Product of a and b
return the value of c = a*b

4 years ago

Solved


Characterize fluid flow in a pipe as to laminar or turbulent
In fluid mechanics, characterizing the flow in a pipe is essential to predicting its behavior. The flow pattern can either be la...

4 years ago

Load more