Chain multiplication - 05
Following up on the problem in 55305, you found the optimal way of multiplying a chain of matrices.
In problem 55315, you had t...
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...
Data Regularization
Provided is an m-by-n integer data matrix A whose elements are drawn arbitrarily from a set *S* = [1,2,3,...,S] for any large in...
Generalised Hamming Number
Inspired by Project Euler n°204 and Problem 1308 by James
A generalised Hamming number of type n, has no prime factor larger ...
2年弱 前
解決済み
Give me Hamming on five, hold the mayo
A Hamming Number is a positive number that has no prime factor greater than 5. Given a number X, determine how many Hamming num...
2年弱 前
解決済み
Nth roots of unity
First, find the n nth roots of unity.
eg if n = 6, find the n distinct (complex) numbers such that n^6 = 1.
<https://en.wiki...
2年弱 前
解決済み
Polar Form Complex Number Entry
Write a function that takes the magnitude and angle(in degrees) of a complex number and returns a complex variable. Positive ang...
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年弱 前
解決済み
Sequence
Let S be a sequence of numbers
Let
Find for some , where and .
Total resistance of resistors in parallel
What is the total resistance of a number of resistors in parallel?
A vector R contains the resistances (in Ohm) of n resistors,...
Exhaust all possible logical vectors
Input a length argument and list all possible logical vectors of that length.
My solution is of size 29. Can you find an even s...