A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

A résolu


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

3 mois il y a

Charger plus