Your cart is currently empty!
Tag: JavaScript
Result and Reflection for “My Experiment to Crack the Coding Interview”
So… my mad ditch effort to pass the mock coding interview (written about in the previous blog here) was not a great success but not a great fail either. In short, I was unable to complete the coding challenge in time, but the interviewer suspected I’d have been able to complete it if given more…
An Experiment to Crack the Coding Interview
Having only graduated Flatiron Software Engineering School this past Monday, this blog post is somewhat speculative. It’s about a hypothesis, one that I will get to test very quickly thanks to a parting gift from Flatiron. A token to SkilledInc, where we get tested on our technical chops. One of the things that it seems…
Three Pointers
Three Pointers is almost identical to “two pointers” except there is a third pointer (or “pincer”). This is useful for “three number sums”, or going with the ball factory example from the Two Pointer post, perhaps an item where three different balls are packaged together. A use case that I find fascinating might be K…
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 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…
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…
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,…
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…
Palindromes, or The Sock Draw of a Troubled Mind
A palindrome is a word like “RACECAR” or “DID”, it is the same both forwards and backwards. Today, we’re going to cover several Javascript solutions with some variations that might be useful. Where does “The Sock Draw of a Troubled Mind” come into play? That’s a good question… but it seems safe to assume that…
objectMap from Array or String: The Snitch
While many of the other algonalogies have stories accompanying code… the code for this is a pretty direct expression for the analogy. Think of a “Snitch” an “Informant” from a cop movie… or in a historical light: “The Kindly Old Neighbor” who works for the Stasi or GPU (secret police), keeping track of your every…
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…