A résolu

Linear Motion 3
Suppose a robot is moving in a straight line and steadily increases its speed. It moves from v1 ft/s to v1+2 ft/s in the first ...

5 mois il y a

A résolu

Linear Motion 4
A robot accelerates at a rate of A ft/s2. Assuming the robot starts from rest how much time is required to reach an object loca...

5 mois il y a

A résolu

Linear Motion 6
An experimental vehicle traveling at v1 m/s is brought to a full stop in t seconds. How far does it travel before stopping? Roun...

5 mois il y a

A résolu

Linear Motion 7
A robot has a maximum rate of acceleration of a m/s2. If the robot starts from rest and reaches a velocity of v2 m/s. How far ha...

5 mois il y a

A résolu

Unique - Very Very Large Numbers
Given a vector column, with some very large numbers, create the ascending sort and unique vector. *Input:* A (column vector)...

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

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

5 mois il y a

A résolu

List the semiprimes
A semiprime number—or a 2-almost prime—is the product of two prime numbers. The numbers and are semiprimes, but and are not....

6 mois il y a

A résolu

Sequence
Let S be a sequence of numbers Let Find for some , where and .

6 mois il y a

A résolu

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

6 mois il y a

A résolu

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

6 mois il y a

A résolu

Find the number of primes leq than input
Given an integer n, determine the number of primes less than or equal to n.

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

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

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

7 mois il y a

A résolu

Sort vector by number of prime factors of each element
Sort a given array based on how many prime factors each term has. Sort from least to greatest and output original values. Ex: ...

7 mois il y a

A résolu

Return longest string in 1-D array of strings
Find the longest string in an array of strings. Return an empty string if the initial array is empty. If there are multiple stri...

7 mois il y a

A résolu

Extract the main diagonal of a matrix
Extract the main diagonal of a matrix and return as an array. For example, the main diagonal of the following matrix would be: ...

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

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

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

7 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

7 mois il y a

A résolu

Absolute Value of the Product of Complex Numbers
Find the absolute value (modulus) of the product of two complex numbers given by a + bi and c + di.

7 mois il y a

A résolu

True engineer
Prove that pi is indeed equal to e. Return 1 by rounding pi and e to the nearest integer then asserting rounded pi and e are eq...

7 mois il y a

A résolu

Determine if a number is divisible by two
Determine whether the number is divisible by two

7 mois il y a

A résolu

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

7 mois il y a

A résolu

Determine if the number is divisible by 5 or not
Given a number, return true if it is divisble by 5

7 mois il y a

A résolu

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

7 mois il y a

A résolu

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

7 mois il y a

A résolu

Determine whether a number is unprimeable
The number 204 is unprimeable because no single digit can be changed to make it prime. In contrast, the number 207 is not unprim...

7 mois il y a