Today’s challenge in LeetCode is Subtract the Product and Sum of the Digits of an Integer.
Today’s challenge from LeetCode is Find All Disappeared Numbers in Array.
Browsing through the top interview questions in LeetCode, one of the harder easy questions is this one:
In today’s challenge from LeetCode, we’re looking for the common items in two arrays.
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:
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…
A few months ago, I created a React App portfolio website. I gave it a few pages:
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
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: