Solved


Find the nearest prime
Given a positive integer 'n', the task is to find a prime number greater than or equal to 'n'. Example 1 If given 'n' is ...

3 years ago

Solved


Isothermal Expansion
Given the initial pressure and volume of an ideal gas, calculate the new volume, given the new pressure. Hint: <https://en.wi...

3 years ago

Solved


Reverse Concatenation
Suggest methods to form a Matrix after deleting one of the input's elements. Input should be element's position and output shou...

3 years ago

Solved


Find the position of last minimum value in an integer array with numbers
If x = [2 6 4 9 -10 3 1 5 -10] then the output should be 9, because last minimum value (-10) lies at the 9th position.

3 years ago

Solved


Neither minima nor maxima
Input v is a vector. Return all the elements of v which are not a local minimum or maximum. Example: v = [1 2 3 4 5] Ou...

3 years ago

Solved


How to calculate the length of a triangle's side given two angles and one side
You are given a triangle with angles alpha, beta and gamma and sides a opposite alpha, b opposite beta and c opposite gamma. ...

3 years ago

Solved


Mo money, mo math 1! (★★★)
(adapted from Prob 9 Cody team) You have a vector where the elements represent the number of $20 bills, $10 bills, $5 bills, ...

3 years ago

Solved


Median computation (★)
Given a vector of values, compute the median. The median is defined as the middle value in a set of *sorted* data. Thus, if ...

3 years ago

Solved


Subtract integers and add doubles
Create a function that subtracts a from b if a and b are integers and adds them if they are floats.

3 years ago

Solved


Convert binary numbers array into array of decimal numbers.
Convert binary numbers array into array of decimal numbers. Example x=[ 11001000 ; 11001001 ; 11001010 ; 11001011 ; 11001100 ;...

3 years ago

Solved


0, 2, 0, -2, 0, 2, 0, -2, ...
Generate the first n terms of a periodic sequence defined as f(x) = 0, 2, 0, -2, 0, 2, 0, -2, ..., for x = 1, 2, 3, 4, 5, 6...

3 years ago

Solved


Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...

3 years ago

Solved


Repeat The Components of Matrix
Repeat The components of a matrix so that the size of the output matrix is double to input matrix and components are repeated ne...

3 years ago

Solved


row removal
Consider a matrix and remove the first row of the matrix.

3 years ago

Solved


Uniform binary crossover
Given two binary vectors, return the two children by combining the genes of them using a binary crossover mask. More informat...

3 years ago

Solved


No more zeros
Given an array with zeros at the beginning or at the end, you should get the output without these zeros: input = [zeros(5...

3 years ago

Solved


determine the sum of the squares
if x = 4, the solution will be: y = 1^2+2^2+3^2+4^2=1+4+9+16 = 30.

3 years ago

Solved


Increment up an input vector
Increment up an input vector by adding the indices to the vector values. For example, if an input vector is [3, 2, 6, 1, 6], the...

3 years ago

Solved


volume of torus
Find volume of torus with a as major radius and b as minor

3 years ago

Solved


Change number representation to HEX
Given a number change it's representation to HEX and output it.

3 years ago

Solved


Find minimum and maximum elements of an array
For a given array find minimum and maximum elements of an array and store minimum value in first index of output and maximum in ...

3 years ago

Solved


How many digits are there?
Input(s) - any string Output(n) - number of digits within string s

3 years ago

Solved


Prime Letters = Removing
Given a string, remove all the letters which in ASCII Code are prime numbers. For Example: s1 = 'Determine which array e...

3 years ago

Solved


Determinant of a 3x3 Matrix
Return the determinant of a 3x3 matrix. The built-in Matlab function det is not allowed.

3 years ago

Solved


Count me in
Count the number of occurrences of the second input in the first input Ex. x1 = 12344455511; x2 =2; output = 1 ...

3 years ago

Solved


Create tangent function out of sine function only
Please don't use cosine and tangent functions

3 years ago

Solved


Compound Interest : Future Value
Theorem : Compound Interest where, F : Future value at the end of n periods P : Present value r : Annual nominal rate n :...

3 years ago

Solved


Simple Interest : Calculate Present Value
Theorem : Simple Interest where; F : Future Value P : Present Value r : Annual simple interest rate (decimal) t : Time in...

3 years ago

Solved


Calculate Alcohol By Volume with Original and Final Gravity
Given an initial gravity of un-fermented wort (OG) and a final gravity of fermented wort (FG), better known as beer, it is possi...

3 years ago

Solved


Delete blanks at the end of string
you got to delete all blank spaces which appears at the end of string

3 years ago

Load more