문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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

2개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

문제를 풀었습니다


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개월 전

더 보기