~/talk

Algorithm Intuition (part 2 of 2)

Talkat CppCon 2019 · 2019-09-15..09-20· [c-and-cpp]
slides:none on file

Covers 11 numeric STL algorithms (calls out 111 algorithms total) and shows concrete rewrites: use transform_reduce to compute adjacent differences without extra memory, use inclusive_scan (partial_sum) to answer range-sum and rain-trapping queries, and use an adjacent_transform pattern (zip with tail) to find min gaps or longest equal runs. Points out real pitfalls: a naive fold breaks parallelism (non‑associative lambda), RMS examples miss dividing by n, and Ben Dean’s result of implementing 77 of 90 pre‑C++17 algorithms from accumulate. Uses C++17/20 features and range examples; code and slides on GitHub.

AI-written summary · about

  1. 0:00Introduction to algorithm intuition
  2. 1:58Summary of part one
  3. 4:46Numeric header algorithms overview
  4. 9:00Revisiting adjacent difference
  5. 12:14Transform reduce favorite algorithm
  6. 23:51Partial sum and inclusive scan
  7. 34:16Algorithm intuition table
  8. 37:18Solving Codeforces problem
  9. 44:16Adjacent find and adjacent transform
  10. 51:42Transform inclusive scan
  11. 53:26STL algorithm composability issues
  12. 56:14Conclusion and Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.