Category: Software Engineering

  • Divide and Conquer

    This is a searching pattern that works best on pre-sorted data where you grab a midpoint value and would then determine whether the thing you’re looking for is of greater or lesser value. If you were dealing with a million numbers (or numerical IDs) then it could save you a lot of time. For example:…

  • Reversing a Linked List

    As with many coding interview questions, the “usefulness” of a specific puzzle seems “useful” mostly in the context of getting a job. That said, if you need to use some data model to simulate some process in manufacturing, perhaps something where a “setup” requires a bunch of complicated bits and pieces to be entered “left…

  • Tortoise and Hare Pointers

    So… this algorithm seems (at face value) rather pointless outside the context of a coding interview question. However, if you give it “a chance”, you’ll see that the Tortoise and Hare Pointer/Fast and Slow Pointer Pattern reveals the basic mechanic of identifying an Infinite Loop. While the example below does not account for what you…

  • Tortoise and Hare Pointers with The Movie Groundhog Day

    Tortoise and Hare Pointers (the Fast and Slow Pointers). They make sense well enough, the analogy of the fast runner lapping a slow runner on a quarter mile track comes to mind, or perhaps a NASCAR loop where the slowest racer is eclipsed by the fastest… and yet, while I found myself able to appreciate…

  • Pointers, or “Making a Chimera”

    If you read the previous blog post about “Sliding Window”, the concept of “Pointers” might be likened to a window of variable size, where whatever remains between the left side of the window and the right side is what will be iterated through to find what you’re looking for. Common uses for pointers might be…

  • Two Pointers

    The code below is basically the same as the initial example used in the glossary, but doesn’t use reduce. For simpler memorization of the pattern, this example is better. As for the “What” and “Why” of Two Pointers, a frequent example would be some target value, and you need to iterate through some list/array to…

  • The Sliding Window

    The code below is representative of a “semi-involved” Sliding Window. Also, it’s worth reminding that the whole purpose of “memorizing code” is less about “rote memorization” and more about having “rapid access” to a useful pattern. With that in mind the “memory hack” for the sample below is not all encompassing but covers the key…

  • “Setups and Payoffs in Fiction” … or, The Sliding Window Algorithm

    BACKGROUND: While on my adventure to learn algorithms, I was fortunate to have Flatiron graduate Daniel Dawson recommend this course: Grokking the Coding Interview. Despite my having access to multiple Udemy courses, AlgoExpert, InterviewCake etc., (all very helpful in their own way)… Grokking the Coding Interview was a standout, in part because of the recommend,…

  • BubbleSort, Students by Height, and Sedimentation

    Yesterday, I had the good fortune of working with two Flatiron School Graduates, Tyler Caprioli and Coral Fussman to talk through and walk through the BubbleSort Algorithm. Unless you know what a Bubble Sort is to begin with, it’s difficult to code outright. Understanding is a precursor to coding. We ended up working through a…

  • SubSequencing Arrays: “The Awards Ceremony”, and… a Few Words About Learning

    Awesome coding challenge yesterday with fellow dev Ranika Williams from Flatiron School. Though I’ve been attempting to substitute values in code such as “index, idx, val” with more descriptive values and console logs, working through the problem via Zoom with Ranika gave me a new appreciation for the approach. If you’re attempting to tackle algorithms,…

  • Dealing Cards, or “Chunking” Arrays

    When reviewing code, I often find that although I think “understand” what’s happening… it’s often when I try to put myself “into the shoes of the interpreter/compiler” that I realize some flaw in my perception. “Chunking Arrays” in JavaScript is one of those things. Though possible to force myself to memorize code using “totals” or…

  • Anagrams as a Matter of Secret Identity

    On my quest to master algorithms in JavaScript, I make a point of cross referencing different tutorials and solutions, that I might find a happy middle ground and greater understanding. However, if you want to learn straight from the masters, I recommend you check out Stephen Grider’s Algorithms and Data Structures course on Udemy and…