Algorithms
 previous   up   next 
  1. Sorting
    1. Bubble sort
    2. Cocktail sort
    3. Selection sort
    4. Shaker sort
    5. Insertion sort
    6. Merge sort
    7. Merge sort with additional storage
    8. Heap sort
    9. Shell sort
    10. Quicksort
  2. Searching
    1. Recursive binary search in an array
    2. Iterative binary search in an array
    3. Linear search in an array
    4. Find the minimum element in an array
    5. Find the maximum element in an array
  3. Date & Time
    1. Determine if a given year is a leap year
    2. Compute the weekday
    3. Compute the day of year
    4. Compute the week number of a year
    5. Compute the year of the ISO 8601 week date
    6. Compute the week of the ISO 8601 week date
    7. Calculate the number of days in a month
    8. Convert a time into a julian day number
    9. Convert a julian day number into a time
    10. Compute the easter date for a given year
    11. Compute seconds since the Unix Epoch
    12. Write a calendar
  4. String
    1. Replace tabs with the corresponding number of spaces
    2. Replace leading spaces with the corresponding number of tabs
    3. Replace spaces with the corresponding number of tabs
    4. Convert an Unicode UTF-32 string to UTF-8
    5. Convert an Unicode UTF-8 string to UTF-32
    6. Encode a string with the Base64 encoding
    7. Decode a Base64 encoded string
    8. Encode a string with the Quoted-printable encoding
    9. Decode a Quoted-printable encoded string
    10. Encode a string with uuencoding
    11. Decode an uuencoded string
    12. Encode a string with percent encoding
    13. Decode a percent encoded string
    14. Encode a string with the URL encoding
    15. Decode an URL encoded string
    16. Encode a string with the Ascii85 encoding
    17. Decode a Ascii85 encoded string
    18. Encode a string with the AsciiHex encoding
    19. Decode an AsciiHex encoded string
    20. Compress a string using the Lempel Ziv Welch (LZW) compression
    21. Decompress a Lempel Ziv Welch (LZW) compressed string
    22. Compress a string using the run length encoding of bzip2
    23. Decompress a string using the run length encoding of bzip2
    24. Compress a string using the run length encoding of PackBits
    25. Decompress a string using the run length encoding of PackBits
    26. Burrows-Wheeler transform (basic concept)
    27. Inverse Burrows-Wheeler transform (basic concept)
    28. Convert a character string to morse code
    29. Convert morse code to a character string
    30. Wildcard match used in command shells
    31. String compare function where digit sequences are compared numerically
  5. Float
    1. Absolute value
    2. Decompose float into fraction and exponent
    3. Multiply or divide with a power of two
    4. Convert a float to Microsoft Binary Format
    5. Get a float from bits in Microsoft Binary Format
  6. Mathematics
    1. Determine wether a given integer number is prime
    2. Sieve of Eratosthenes
    3. Verify Goldbach's conjecture up to 10000000
    4. Function to calculate the prime factors of a number
    5. Verify if a given Mersenne number is prime
    6. Miller-Rabin primality test
    7. Determine the greatest common divisor of two positive integer numbers
    8. Determine the least common multiple of two positive integer numbers
    9. Binary greatest common divisor algorithm for two positive integer numbers
    10. Binary greatest common divisor algorithm for two bigInteger numbers
    11. Return the modular multiplicative inverse of a modulo b
    12. Modular exponentiation with the binary method
    13. Compute PI with 1000 decimal digits using John Machin's formula
    14. Compute PI with 1000 decimal digits using the Bailey/Borwein/Plouffe formula
    15. Write PI with 1000 decimal digits using Newtons formula
    16. Write the decimal digits of PI with a spigot algorithm
    17. Determine the truncated square root of a big integer number
    18. Function to compute the nth root of a positive float number
    19. Exponentiation function for integers
    20. Exponentiation function for float base and integer exponent
    21. Multiply integers using the peasant multiplication
    22. Binomial coefficient
    23. Gamma function
    24. Matrix addition
    25. Matrix multiplication
    26. Matrix exponentiation with integer exponent
    27. Convert a matrix to row echelon form
    28. Convert a matrix to reduced row echelon form
    29. Dot product
    30. Random number generator
    31. Recursive fibonacci function
    32. Iterative fibonacci function
    33. Display 100 numbers of the fibonacci sequence
    34. The tak function
    35. The ackermann function
    36. The bigInteger ackermann function
  7. Message digest
    1. Compute a message digest with the MD4 message digest algorithm
    2. Compute a message digest with the MD5 message digest algorithm
    3. Compute a message digest with the RIPEMD-160 message digest algorithm
    4. Compute a secure hash value with the SHA-1 algorithm
    5. Compute a secure hash value with the SHA-224 algorithm
    6. Compute a secure hash value with the SHA-256 algorithm
    7. Compute a secure hash value with the SHA-384 algorithm
    8. Compute a secure hash value with the SHA-512 algorithm
  8. Graphics
    1. Draw a dragon curve
    2. Display the bifurcation diagram
    3. Simulate a one-dimensional cellular automaton
    4. Draw a fractal tree
    5. Display a sierpinski triangle
    6. Display a voronoi diagram
    7. Display the Mandelbrot set
    8. Display a brownian tree
    9. Read a bitmap file into a pixmap
  9. File
    1. Check if a file exists
    2. Check if a file is a directory
    3. Check if a file is a regular file
    4. Copy a directory and all its files to a new directory
    5. Move or rename a file
    6. Convert files from windows to unix format
    7. Convert files from unix to windows format
    8. Read a 16 bit little endian integer from a file
    9. Read a 32 bit little endian integer from a file
    10. Read a 16 bit big endian integer from a file
    11. Read a 32 bit big endian integer from a file
    12. Program that encodes and decodes with rot13
    13. Remove empty lines
  10. Puzzles
    1. A program that writes itself
    2. Brainfuck interpreter
    3. Function to solve the Towers of Hanoi problem
    4. Write reciprocal values of the natural numbers from 1 to 20 with 60 digits
    5. Write the numbers between 1 and 3999 as roman numerals
    6. Decode roman numerals
  11. Others
    1. Compute the sum of the elements of an array
    2. Compute the product of the elements of an array

 previous   up   next