All puzzles › Engineering

Engineering Practice Problems

22 puzzles (9 easy, 11 medium, 2 hard), 4 free, in Python, JavaScript and C++.

Units, tolerances and quality checks built into puzzles.

The puzzles, easiest first

  1. Two Thresholds Stop the Flicker (Easy, free): A thermostat with one threshold would click on and off many times a minute as the temperature hovered around it, and wear out the heater.
  2. Average Reading (Easy): Given an array of sensor readings, return the average, rounded to a whole number.
  3. Celsius to Fahrenheit (Easy): Given a temperature in Celsius, return it in Fahrenheit.
  4. Feet to Inches (Easy): Given a length in feet, return it in inches.
  5. Gear Ratio (Easy): Given the tooth counts of the driver gear and the driven gear, return the gear ratio, rounded to 3 decimals.
  6. Kelvin to Celsius (Easy): Given a temperature in Kelvin, return it in Celsius by subtracting 273.
  7. Mechanical Stress (Easy): Given a force in newtons and an area in square meters, return the stress in pascals, rounded to 2 decimals.
  8. Ohm's Law (Easy): Given current in amps and resistance in ohms, return the voltage, rounded to 2 decimals.
  9. Peak Load (Easy): Given an array of sensor readings, return the highest one.
  10. Steer Toward the Target (Medium, free): A PID controller is the loop inside cruise control, drones, ovens and 3D printers.
  11. The Error Points to Itself (Medium, free): A Hamming code sends 4 data bits as 7, and the receiver can repair any one flipped bit without asking for it again.
  12. Trust the Sensor, but Not Too Much (Medium, free): A Kalman filter turns noisy readings into a steady estimate, and it is how a phone smooths its GPS position.
  13. Clamp a Reading (Medium): Given [value, low, high], return the value kept inside the range.
  14. Count Defects (Medium): Given an array of part strengths and a threshold, return how many parts are below the threshold.
  15. Linear Interpolation (Medium): Given two points (x0, y0) and (x1, y1) and an x, return the y on the straight line between them, rounded to 3 decimals.
  16. Parity Bit (Medium): Given an array of bits, return 1 if it has an odd number of 1s, and 0 otherwise.
  17. Pass Rate (Medium): Given readings and a threshold, return the percentage that meet or beat the threshold, rounded to a whole number.
  18. Readings In Range (Medium): Given readings and a low and high limit, return how many readings fall between them.
  19. Root Mean Square (Medium): Given a list of readings, return the root mean square, rounded to 3 decimals.
  20. Within Tolerance? (Medium): Given [measured, target, tolerance], return true if the measurement is within tolerance of the target.
  21. Longest Stable Run (Hard): Given readings and a maxDelta, return the length of the longest run where each reading is within maxDelta of the one before it.
  22. Moving Average (Hard): Given readings and a window size k, return the average of every run of k readings in a row, rounded down.

Practice another pattern

Or browse by subject

Browse all 676 puzzles