Authors: Douglas Wilhelm Harder and Prof. Hiren Patel
Here are over 120 programming challenges you can work on.
- Polynomial representations
- Simple statistics
- Simple encryption algorithms
- Two- and multi-dimensional arrays
- Linear algebra
- Dynamic programming
- Merge sort
- Number theory
- Intervals
- Morse code
- Combinations and permutations
- Tournament scheduling
- ASCII games
- Geometry
- Calendars
- Estimating $\pi$
- Filters
- Calculators
- Series
- Complex numbers
- Physics
- Strings
- Array tools
- Navigation
- Bitwise operations
- Financial algorithms
- Probability distributions
A. Polynomial representations
- Polynomials as arrays,
- Polynomials as linked lists,
- Accessing or setting a coefficient,
- Retrieving the degree of a polynomial,
- Evaluating a polynomial at a point,
- Multiplying a polynomial by a scalar and negating a polynomial,
- Adding and subtracting two polynomials,
- Finding a linear combination of two polynomials,
- Multiplying two polynomials,
- Multiplying two polynomials-as-array with divide and conquer,
- Multiplying two polynomials-as-array with the fast Fourier transform,
B. Simple statistics
- Mean and standard deviation (to be written)
- Median and order statistics (to be written)
- Least squares (to be written)
- Approximation uniformly distributed events
- Approximation exponentially distributed events
- Approximation normally distributed events
- The integral of the standard normal distribution
C. Simple encryption algorithms
- Stream ciphers
- Block ciphers (to be written)
- Binary-to-text conversion (ASCII armour)
- DRYAD ciphers: the need for pairs
D. Two- and multi-dimensional arrays
- Local multi-dimensional arrays
- Passing local multi-dimensional arrays as arguments
- Dynamically-allocated multi-dimensional arrays
- Efficient dynamic multi-dimensional arrays
E. Linear algebra
- A mathematical vector class (to be written)
- Multiplying by a scalar (to be written)
- Adding two vectors (to be written)
- Inner product (to be written)
- Inner product (to be written)
F. Dynamic programming
- Fibonacci numbers, and
- Binomial coefficients.
G. Merge sort
- Merging sorted lists (to be written)
- Merging sort (to be written)
- Sieve of Eratosthenes
- Integer roots
- Greatest common divisor and least common multiple
- Iterative primality testing
- The kth prime number
I. Intervals
- Intervals
- Assignment
- Interval arithmetic
- Scalar arithmetic
- Functions
J. Morse code
- Converting to Morse code
- Converting from Morse code
K. Combinations, permutations and recursion
- n choose k (Lotto 6/49)
- Playing without repetition
- Factorial function
- Binomial coefficients
- McCarthy 91 function
- Collatz conjecture
- Fibonacci numbers
- Ackermann function
- Gray codes
- Subsets
- Permutations
- de Bruijn sequence
L. Tournament scheduling
- Round-robin tournament
- Single-elimination tournament
- Double-elimination tournament
M. ASCII games
- Tic-tac-toe
- Rock-scissors-paper
- Connect four
- Hangman
- High-low
- Nim
- Sliding puzzle (to be written)
N. Geometry
- Description of a triangle
- Convex hull (gift-wrapping algorithm)
(to be written)
- Find the mid-point of a line
- Determine if three points co-linear
- Determine if two line segments intersect
- Reflect a point through a line
- Reflect a line through a point
Other algorithms to consider including: geeksforgeeks.org.
O. Calendars
- Printing the Gregorian calendar
- Printing the Islamic calendar
- Printing the Julian calendar
If anyone would like to assist in making another project introducing
another calendar that can be calculated (for example, the Baha'i
calendar with 19 months of 19 days with four or five
intercalary days), please contact
Douglas Harder
Thank you.
P. Estimating $\pi$
- Series
- Randomized algorithms
- Archimedes's method
- Efficient series
Q. Filters
- Averaging filter
- Simple low-pass filter
- Simple recursive averaging filter
- Differentiation and integration
R. Calculators
- Unit conversions
- Stack calculator
S. Series
- Arithmetic series
- Geometric series
- Bernoulli numbers
T. Complex number class
U. Physics
- Gravitational and electromagnetic force
- Time dilation and length contraction
- Projectile motion
V. Strings
- Lexicographical comparison (to be written)
- Capitalization
- Pig latin
W. Array tools
- Zero-entry queries
- Shift and circular shift
- Fill
- Shrink and resize
- Interleave
- Find and find all
- Partial sums
- Concatenate
- Reverse
- Permute (to be written)
- Print
- Create a library
X. Navigation
- Distance between points in UTM
- Angle between points in UTM
- Distance between points in latitude and longitude
- Angle between points in latitude and longitude
Y. Bit-wise operations
- Bit rotations
- Arithmetic right shift
- First and last 1 et al.
- Ones count
- Trailing bit manipulations
Z. Financial algorithms
AA. Probability distributions
- Bernoulli distribution
- Discrete uniform distribution
- Continuous uniform distribution
- Create a library