Nathaniel’s Blog

Personal blog for Nathaniel Cantwell; opinions are mine

  • Finding the Longest Cold-Snap

    Here’s a simple programming question: Given a time-series of temperature measurements, what is the longest continuous sequence of days during which the temperature was below freezing? Pretty straightforward, right? It’s the type of question you might expect to see during a technical interview or a first-year lesson on how arrays work. My motivation for discussing this goes deeper, however. I first encountered a modified version of this problem during an internship between my third and fourth year studying Computer Engineering.