stationeers.de Mod workshop · Dominik1199
DE Sign in
  1. Home
  2. IC10 academy
  3. Day 301

Day 301 of 365 · Expert · Month 10: Bits and data

Review week 43: algorithms

Ten questions on algorithm week: lookup tables, interpolation, sorting, searching, statistics and the data logger.

Review 12 min Week 43

What you learn today

  • Quiz on tables, sorting and statistics

This week the stack got proper data structures. For review:

  • Lookup table: precompute values, store them with poke. Index = (reading − offset) / step, floor, clamp.
  • Interpolation: the integer part selects the neighbours, the remainder is the fraction. lerp limits the fraction to 0 to 1.
  • Sorting: bubble sort compares neighbours and swaps through two registers. n · (n − 1) / 2 comparisons – expensive.
  • Searching: linear, with early exit. Minimum and maximum in one pass, the position with a comparison of its own.
  • Statistics: mean, range, standard deviation in two passes. Outliers: more than 2 σ from the mean, with sgt.
  • Data logger: ring buffer with mod, tick counter for the interval, no NaN into the buffer.

You pass from 60 %.

Weekly quiz

10 questions. You pass from 60 % – the server does the grading.

Complete the day

  • Passed the quiz with at least 60 %

Without an account progress is saved in this browser only.

Report a mistake in this lesson

Please sign in to report. Sign in

Esc
↑ ↓ selectEnter open/ opens search anywhere