Solved


Set Soldner's constant

7 days ago

Solved


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

7 days ago

Solved


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

7 days ago

Solved


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

7 days ago

Solved


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

7 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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

8 days ago

Solved


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

9 days ago

Solved


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

9 days ago

Solved


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

9 days ago

Solved


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

9 days ago

Solved


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

9 days ago

Solved


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

9 days ago

Solved


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

9 days ago

Solved


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

9 days ago

Solved


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

9 days ago

Solved


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

9 days ago

Solved


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

9 days ago

Solved


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

9 days ago

Solved


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

9 days ago

Load more