2010年7月20日火曜日

Goldbach's conjecture

A list of prime numbers

Compare the two methods of calculating Euler's totient function

Calculate Euler's totient function phi(m) (improved)

Determine the prime factors of a given positive integer (2)

Determine the prime factors of a given positive integer

Calculate Euler's totient function phi(m)

Determine whether two positive integer numbers are coprime

Determine the greatest common divisor of two positive integer numbers

Determine whether a given integer number is prime

2010年7月19日月曜日

Sorting a list of lists according to length of sublists

Group the elements of a set into disjoint subsets

Generate the combinations of K distinct objects chosen from the N elements of a list

Generate a random permutation of the elements of a list

Lotto: Draw N different random numbers from the set 1..M

Extract a given number of randomly selected elements from a list

Create a list containing all integers within a given range

Insert an element at a given position into a list

2010年7月15日木曜日

Remove the K'th element from a list

Rotate a list N places to the left

Extract a slice from a list

Split a list into two parts; the length of the first part is given

Drop every N'th element from a list

Replicate the elements of a list a given number of times

Duplicate the elements of a list

Run-length encoding of a list (direct solution)

Decode a run-length encoded list

Modified run-length encoding

Run-length encoding of a list

Pack consecutive duplicates of list elements into sublists

Eliminate consecutive duplicates of list elements

Flatten a nested list structure

Find out whether a list is a palindrome

Reverse a list

Find the number of elements of a list

Find the K'th element of a list

Find the last but one box of a list

Find the last box of a list