解決済み


Set Soldner's constant

11日 前

解決済み


Evaluate the logarithmic integral
The <https://en.wikipedia.org/wiki/Logarithmic_integral_function logarithmic integral> li(x) plays a role in number theory becau...

11日 前

解決済み


Evaluate the prime zeta function

11日 前

解決済み


Evaluate the gamma function
The gamma function is a generalization of the factorial, and it appears in many applications such as evaluating certain integral...

11日 前

解決済み


Differential equations I
Given a function handle |f| an initial condition |y0| and a final time |tf|, solve numerically the differential equation dy...

11日 前

解決済み


Monte-Carlo integration
Write a function that estimates a d-dimensional integral to at least 1% relative precision. Inputs: * d: positive integer....

11日 前

解決済み


Jump Search - 01
Find the number of leaps you need to take to find an element in an array using the jump search algorithm. For example, a=[ 2,...

12日 前

解決済み


How lucky r u ?
Find the nth number in the following sequence <https://oeis.org/A264940>

12日 前

解決済み


Last Duplicate
Given an array of integers, find the last duplicate element — that is, the element whose second occurrence appears latest in the...

12日 前

解決済み


ZigZag - 04
Given a matrix, print all its elements in the spiral form (clockwise direction). For example, a=[16 2 3 13 ...

12日 前

解決済み


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

12日 前

解決済み


Ugly numbers - 01
Ugly numbers are those whose prime factors are 2, 3 or 5. find the nth ugly number.

12日 前

解決済み


Count alternating permutations
In an alternating permutation of numbers 1 to n, the numbers are arranged so that they alternately increase and decrease. For ex...

12日 前

解決済み


The Tortoise and the Hare - 01
Suppose in an infinitely long line, the hare is standing in position 0. From that place, it can jump either in the +ve direct...

12日 前

解決済み


Measure the hydraulic conductivity with a falling-head permeameter
A falling-head permeameter is another device for measuring the hydraulic conductivity of a soil sample. In this problem the sam...

12日 前

解決済み


Find the circle inscribed in a triangle
Write a function that takes the x- and y-coordinates of three points describing the vertices of a triangle and returns the cente...

13日 前

解決済み


Compute the perimeter of an ellipse
While the area of an ellipse is straightforward to compute, the perimeter (or circumference) is more complicated. The perimeter ...

13日 前

解決済み


List mean-of-2 primes
The prime number 53 is the average of the first prime before it (47) and the first prime after it (59), and the prime number 11 ...

13日 前

解決済み


chess position
given the position of a chess piece in algebric notation, convert it into 8 by 8 matrix format. For example, * 'Qd5' >> [3,4]...

13日 前

解決済み


Yoonir - 02
Find the area of a six-pointed star inscribed in a circle of radius r.

13日 前

解決済み


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

13日 前

解決済み


Tell your secret
A secret can be told only to 2 persons in 5 minutes. Now, these 2 more persons can spread the secret to 4 other people in the ne...

13日 前

解決済み


Two functions (to be sure)
I want to compute the number of odd/even numbers in an array. But I want the results by two different functions. Example: ...

13日 前

解決済み


Area-03
There are two circles of equal size are inscribed inside a square. They are tangent to each other. <https://serving.photos.ph...

13日 前

解決済み


Moving average
A moving average function that returns an array that is equal in length to the input arrays (which can be row or column) A va...

13日 前

解決済み


Nth Order Polynomial Regression
Inputs: -two vectors x and y (row or column) -order of polynomial, p Outputs: -vector of coefficients [b0 b...

13日 前

解決済み


GJam 2014 China Rd A: Library Sorting (Large)
This Challenge is derived from <http://code.google.com/codejam/contest/2924486/dashboard#s=p2 GJam 2014 China Sorting>. Subset ...

13日 前

解決済み


Move Array Element by Offset with Optional Ring Mode
Move Element by Offset Write a function moveab(x, A, B, option) that moves the element at index A in array x by B positions. P...

13日 前

さらに読み込む