Solved


Ridge regularized linear regression
Given a predictor data matrix of size , target variable vector of size and a shrinkage factor (scalar) (ridge regularization...

alrededor de 1 mes ago

Solved


Calculate Percentage
Given marks obtained and total marks, calculate the percentage.

alrededor de 1 mes ago

Solved


Find all prime factors of the input
Given an input x, find its all prime factors. Return the vector with all factors in ascending order. Efficiency is the key here...

alrededor de 1 mes ago

Solved


Sum of 2 numbers in array
Given an array and a target sum, return true if any 2 numbers in the array sum up to the given target sum. Both numbers cannot h...

alrededor de 1 mes ago

Solved


Find distance travelled by an object starting from rest in time 't' and linear acceleration 'a' = 3t
Find distance travelled by an object starting from rest in time 't' with linear acceleration a = 3t. You are given time t as an ...

alrededor de 1 mes ago

Solved


Sum of Cubes
Given n, find the sum of cubes of integers till n. For example, if n = 3, then answer is 1^3 + 2^3 + 3^3 = 36.

alrededor de 1 mes ago

Solved


Create a column vector of n elements between a and b (both included)
Given lower limit a and an upper limit b, create a column vector of n elements inclusive of a and b. For example: a = 1, b = 4,...

alrededor de 1 mes ago

Solved


Caesar Cipher Shift
Given a word and its encrypted version using the caesar cipher, find the shift used.

alrededor de 1 mes ago

Solved


Mix it up!
Given an input string S, return a new string B, that is created by taking one character from the front and then the end iterativ...

alrededor de 1 mes ago

Solved


Remove elements in a vector
Given a number x and a vector y, remove all occurrences of x in y. Examples: Input1 x = 1 Input2 y = [1 2 3 5] Output ...

alrededor de 1 mes ago

Solved


Determine if a number is prime
A prime number is a whole number greater than 1 whose only factors are 1 and itself.

alrededor de 1 mes ago

Solved


Length of shortest path in a directed graph.
Given a directed graph and a start and end node in the graph, return the minimum number of hops required to reach the end node f...

alrededor de 1 mes ago

Solved


Caesar Cipher
Given a input word x and a shift n, encrypt the word with caesar cipher of shift n.

alrededor de 1 mes ago

Solved


Find two numbers that add up to the target value
Given a vector A and target n, return the indices of two numbers that add up to n. If there are multiple solutions, return the f...

alrededor de 1 mes ago

Solved


Determine if the inputs are divisible by both 3 and 5.
Given a integer x: return true if it is divisible by both 3 and 5, return false if it is not divisible by either 3 or 5.

alrededor de 1 mes ago

Solved


Sum of Arithmetic Progression
Given the starting number, difference and the number of terms - find the sum of the arithmetic progression.

alrededor de 1 mes ago

Solved


Draw a X
Given an input , create a square matrix of zeros with an X of ones. Ex. n = 3 drawX(3) [ 1 0 1 0 1 0 1 0 1 ] ...

alrededor de 1 mes ago

Solved


Determine if all elements are odd
Given an array, return true if all of the elements are odd. ex. x = [3 4 1] allOdd(x) ans = false ex. x = [3 5 7; 5 9...

alrededor de 1 mes ago

Solved


determine skid distance of car
Determine the distance a car skids to a stop given initial velocity (v) and time (t).

alrededor de 1 mes ago

Solved


determine if input is Odd
Find whether the input is odd. return 1 if true or else 0

alrededor de 1 mes ago

Solved


Can you Jump?
You have been provided with input array of integers. You start with initial position at the first index of this input array, and...

alrededor de 1 mes ago

Solved


Invert a Logical Matrix
Given a logical matrix, invert its values

alrededor de 1 mes ago

Solved


find the position of the given number in vector
return the position of the number in vector

alrededor de 1 mes ago

Solved


return odd numbers
Return odd numbers in an vector

alrededor de 1 mes ago

Solved


determine if input is even
find the number is even or not

alrededor de 1 mes ago

Solved


Calculate the surface area of a sphere
Given the radius of a sphere, calculate the surface area

alrededor de 1 mes ago

Solved


Find the median of elements in vector without using in built median function
Given a vector, find the median of the vector whose length is odd without using in built median function. Input : [1,1,2,4,5,5,...

alrededor de 1 mes ago

Solved


Determine if integer is even
Write a function to determine if an input integer(n) is even. The output should be a boolean (true or false).

alrededor de 1 mes ago

Solved


Two sum
Give a vector of numbers and a target, return indices of two numbers such that they add up to the target

alrededor de 1 mes ago

Solved


Find Min and Max Differences in a Vector
Given an array of integers, return the absolute largest and smallest (non zero) difference between any two numbers in the array....

alrededor de 1 mes ago

Load more