Noob. v. Algorithms #23, a custom, speedy method for finding the difference in two arrays

Image for post
Image for post
difference between two arrays in red, image from Wikipedia

Today’s challenge from LeetCode is Find All Disappeared Numbers in Array.

Noob v. Algorithms #22, playing with .pop(), .unshift() and .splice()

Image for post
Image for post
rotate right!

Browsing through the top interview questions in LeetCode, one of the harder easy questions is this one:

Noob v. Algorithms #21: Intersection of Two Arrays, with .filter()

Image for post
Image for post
image from Wikipedia

In today’s challenge from LeetCode, we’re looking for the common items in two arrays.

Noob v. Algorithms # 20, iterating from the outside in

Image for post
Image for post
Photo by Doğukan Şahin on Unsplash

If you’re a noob like me you may dread the ‘medium’ level algorithms on LeetCode. As it turns out, a few of them are actually easier than the so-called Easy ones. Here’s a gentle introduction to the medium level.

Today’s challenge from Leetcode is to choose the container that holds the most water:

Noob v. Algorithms #19, improving runtime by operating on arrays in place

Image for post
Image for post
lumpy patio — photo from CharlestonCrafted

Long ago, my husband and I hand-laid a brick patio in our backyard. (Yes, we put in a by-the-book base of gravel, sand, weed-blocking material, you name it). Over the years, some areas have sunk. If we wanted to redo it, we’d have to take off the bricks and level the gravel base underneath.

Which brings us to our challenge:

Let’s say you the following (lumpy!) patio, where each number stands for the height of the gravel in that part of the grid, measured in arbitrary units:

8    4    3    9    21    5    6    8    07    4    3    9…

Plus: how to hide fun stuff behind slow fade-ins …

Image for post
Image for post
my son at Glacier National Park. It’s now the cover photo of my portfolio.

A few months ago, I created a React App portfolio website. I gave it a few pages:

  • Home
  • Projects
  • Resume
  • Blog Posts
  • About

On the home page, I added some basic welcome text, a large photo and a link to my portfolio page. Then I began to wonder: why force visitors to enter through the home page, when the page I really want them to see is the portfolio page?

I considered dumping the home page altogether, but it is kind of nice to have somewhere to start.

So how can you have a lovely home page without making visitors feel like it’s an unnecessary pit stop on the way to a more popular page? …

Noob v. Algorithms #17, the Sieve of Eratosthenes

Image for post
Image for post
picture from

Before we get started on today’s challenge, a word about prime numbers: They are, of course, numbers that are greater than one that are divisible only by themselves and one.

If you’re like me, you probably learned about them many times by the time you graduated from high school. But you missed the memo on why we care. The short answer is, we can use very large prime numbers for encryption. More details on that here.

For today’s puzzle in LeetCode:


Joan Indiana Lyness

Full-stack developer, Ruby, Rails, JavaScript, i love! React. My portfolio:

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store