Solved


Mathematical formula
Find the value of the expression given the values of variables t and k. Assume g=9.81

2 months ago

Solved


Convert a given Character to its decimal equivalent value
Convert a given character to its decimal equivalent value according to the ascii table. if x = '!'; y = 33; if x = 'u'; ...

2 months ago

Solved


Magical Land
Mother Earth has gifted humanity a magical land to help all life on earth, in the shape of a n-sided regular polygon. You, bein...

2 months ago

Solved


Solutions to Generalized Pell Equation or Quadratic Diophantine
The generalized Pell equation is of the form: . Given D and N as inputs, output the first 50 positive integer solutions [x, y] s...

2 months ago

Solved


Convert Periodic Continued Fraction to Fractional Radical Representation
Every periodic continued fraction can be prepresented by a number of the form where p, q, and d are all integers with d>0, , an...

2 months ago

Solved


increasing sequences
Given a string of digits, insert commas to create a sequence of strictly increasing numbers so as to minimize the magnitude of t...

2 months ago

Solved


Chain multiplication - 04
Following up on the problem in 55305, you found the optimal way to multiply a chain of matrices. However, here in this problem,...

2 months ago

Solved


Chain multiplication - 03
Following up the problem in 55305, you found the minimum number of multiplications needed to multiply a chain of matrices. In ...

2 months ago

Solved


Sort Non-zeros
Consider 0s in a vector creates a break-point. sort all the sub-arrays created by those break points. For example, a = [3, 4, 1...

2 months ago

Solved


Chain multiplication - 01
Say, you are given two matrices - A (shape= 3*4) and B(shape = 4*5). If you multiply these two matrices, the resultant matrix w...

2 months ago

Solved


Cut the rod
A rod of length n can be cut in different sizes. Different price is associated with different length of cuts. length, len= [1,...

2 months ago

Solved


Number of leaps in binary search
Binary search is one of the most popular searching algorithms (Binary Search Algorithm). It works only in a sorted array. It uti...

2 months ago

Solved


Parametric Array
Create a row vector, 1xN (Integer, >1), such that the mean of the vector is M (Real number) and the standard deviation of the ...

2 months ago

Solved


Determine whether one vector is a subset of another
While bumbling through a pair of problems in the Number Theory group, I wrote code to determine whether a vector is a subset of ...

2 months ago

Solved


Scorer's Function
Evaluate the Scorer's function for a given input. The expected output is Gi(x). Note - The precision will vary for test cases...

2 months ago

Solved


Sequence
Let S be a sequence of numbers Let Find for some , where and . Update - test suite cleaned up on 2-9-22

2 months ago

Solved


Momentum Calculation
A shopping cart of mass 'm1' is traveling with velocity 'u' and collides with a second shopping cart of mass 'm2.' The two shopp...

2 months ago

Solved


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

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

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

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

2 months ago

Solved


Draw 'W'
For any given n, return a matrix of height n and width 4n-3 containing a W of ones. Example: n=2 ans= [1 0 1 0 1 0 1 0 1 0...

2 months ago

Solved


Draw a triangle of ones
For any given n, return a matrix that includes a triangle of ones of height n: Example n = 3 output = [0,0,1,0,0 ...

2 months ago

Solved


Minimum number of children to distribute unequal cookie portions
A cruel parent wants to distribute N cookies such that it is impossible for every child to receive the same number of cookies. W...

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

2 months ago

Solved


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

2 months ago

Solved


B-Zuckerman Numbers
Similar to my last problem (B_Harshad Numbers), B-Zuckerman Numbers are numbers that are divisable by the product of their digit...

2 months ago

Solved


B-Harshad Numbers
Determine (and provide as output in decimal form) all the harshad numbers base B (B-Harshad) from a given array of decimal numbe...

2 months ago

Solved


Monty Python and the Holy Grail: Crossing the Bridge of Death
To cross the Bridge of Death, your function must return the numerical value for the airspeed velocity of an unladen swallow

2 months ago

Solved


Draw a fancy '7' in a zero matrix!
Given a x-by-x matrix filled with zeros (x is odd and > 3). Use 7s to draw a number 7 into it! Like this: x = 5, y = 7 7 7 7 7...

2 months ago

Load more