해결됨

Repeat elements of a vector

Repeat each elements of a given vector according to their values. say x=[1,2,1,3] y=[1,2,2,1,3,3,3]

4달 전

해결됨

microseconds passed today

Calculate the amount of microseconds passed for a given date string. Return the value, rounded to the nearest integer, as a stri...

4달 전

해결됨

Check prime numbers

Let x, return 1 if x is a prime number, 0 otherwise e.g x = 7, return y =1; x = 6 return y = 0;

4달 전

해결됨

Given a vector x, return vector y with all negative elements from the vector x.

Given a vector x, return vector y with all negative elements from the vector x if x has negative elements. Otherwise return 0. ...

4달 전

해결됨

Frequency Analysis of Text

Frequency analysis is a common task in cryptoanalysis. It is essentially counting the occurrences of alphabets (regardless of ca...

4달 전

해결됨

Check capital letters

Check if each first letter of a string is a capital letter. for example: 'This Is Ok' gives a true answer and 'This Is not Ok' ...

4달 전

해결됨

Project Euler: Problem 11, Largest product in a grid

What is the greatest product of _k_ adjacent numbers in the same direction (up, down, left, right, or diagonally) in a _n×n_ gri...

4달 전

해결됨

Archimedes principle

According to Archimedes principle, the buoyancy force is equal to the weight of fluid displaced by the submerged portion of an o...

4달 전

해결됨

Some tweaks in summation, Can you decode? :)

There are some tweaks in summation that you might observe via test suites Try if you can

4달 전

해결됨

area of an annulus

Given the diameter d of the inner circle of the annulus. Given length z of a chord of the outer circle of the annulus. This chor...

4달 전

해결됨

Logical array indexing - part 1

Given an array |A| of size |p x q| , return an array |Y| of the same size such that the following conditions are satisfied. (...

4달 전

해결됨

Find MPG of Lightest Cars

The file |cars.mat| contains a table named |cars| with variables |Model|, |MPG|, |Horsepower|, |Weight|, and |Acceleration| for ...

4달 전

해결됨

Calculate Inner Product

Given two input matrices, |x| and |y|, check if their inner dimensions match. * If they match, create an output variable |z|...

4달 전

해결됨

Calculate Amount of Cake Frosting

Given two input variables |r| and |h|, which stand for the radius and height of a cake, calculate the surface area of the cake y...

4달 전

해결됨

Convert from Fahrenheit to Celsius

Given an input vector |F| containing temperature values in Fahrenheit, return an output vector |C| that contains the values in C...

4달 전

해결됨

Find the Oldest Person in a Room

Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

4달 전

해결됨

Verify Law of Large Numbers

If a large number of fair N-sided dice are rolled, the average of the simulated rolls is likely to be close to the mean of 1,2,....

4달 전

해결됨

Solve a System of Linear Equations

*Example*: If a system of linear equations in _x₁_ and _x₂_ is: 2 _x₁_ + _x₂_ = 2 _x₁...

4달 전

해결됨

Calculate BMI

Given a matrix |hw| (height and weight) with two columns, calculate BMI using these formulas: * 1 kilogram = 2.2 pounds * 1 ...

4달 전

해결됨

Find the Best Hotels

Given three input variables: * |hotels| - a list of hotel names * |ratings| - their ratings in a city * |cutoff| - the rat...

4달 전