CASE 013: You Can Just Sort Through It?

Image for post
Image for post

Subsequences have always been a concept that trips me up a bit. I don’t know why. But as with anything, the more time I spend working with subsequences, the more I slowly learn and get more comfortable with them.

Either way, the problem we are going to tackle today might seem complicated at first glance, and will provide a good challenge for our critical thinking skills (hopefully).

So, let’s get solving.

Here is a link to the problem on LeetCode

Given the array nums, obtain a subsequence of the array whose sum of elements is strictly greater than the sum…


CASE 012: Flattening The Matrix

Image for post
Image for post

This week, we are returning back to matrices because they are so fun. Just so much fun.

The problem at hand isn't as difficult as problems we’ve solved before like Rotate Image Matrix or Minimum Time Visiting All Points, but still provides a good exercise on different ways you can work through data within a 2D matrix.

So, let’s get solving.

Here is a link to the problem on LeetCode

Given a m * n matrix grid which is sorted in non-increasing order both row-wise and column-wise.Return the number of negative numbers in grid.

The constraints we get are…


CASE 011: Snakes On An Inclined Plane

Image for post
Image for post

I seemed to have fallen into a web of nested arrays, matrices and pattern matching. Today’s problem isn’t as complex as last week’s Onion Swap hullabaloo, but technically still deals with matrices. Technically technically, we are dealing with a graph, but at the same time, we aren’t.

I have also been working on my skills with recursion. One of the ways I’ve been practicing is by going back to problems I have already solved and refactoring them using recursion. So, at the end of this blog, I will also be providing a solution using Tail Call Recursion.

Anyways, let’s get…


CASE 010: In Line And In Time

Image for post
Image for post

It’s been a while since I’ve written a blog about a technical problem I’ve solved. The truth is I haven’t been grinding on HackerRank or LeetCode as much as I used to, and all of my time has been spent working on projects.

That changed this week. Today’s problem took me a long time to solve, longer than I’d like to admit, but provided a great opportunity to shake out the cobwebs and get back on that LeetCode grind. …


How One calc() Function Changed Everything

Image for post
Image for post

This week’s blog is going to be a little different than what I usually write about. I want to share one, if not the most, useful trick I have come across with CSS.

It has allowed me to dynamically scale any HTML element I desire, and it has also removed many of the reasons I’d write media queries.

Before anything, I would like to credit Mike Riethmuller for originally coming up with this function and Geoff Graham of CSS-Tricks for expanding upon its functionality. I am no way taking credit for creating this function. …


Now with more React & Redux

Image for post
Image for post

Last week, we figured out how to automatically detect mobile devices and screen orientation using vanilla JavaScript. Our solution included a few event listeners and a few functions that watch for changes happening in the window and navigator objects supplied by the browser.

Today, we are going to expand upon that solution and implement it with React. We are still revolving around the same window and navigator objects, but with a few more twists and turns as well.

After that, we will install Redux and refactor our solution, removing the need to pass props to any child components that depend…


With Vanilla JavaScript

Image for post
Image for post

As an extension of something I wrote about in my last blog, Top Ten Tips I Learned From Development, I wanted to go into a little more detail about automatically detecting mobile devices and screen orientation with vanilla JavaScript.

This has been something I have been working with a lot over the past week, and I thought it would be a useful topic to write a blog about. …


You Won’t Believe #11!

Image for post
Image for post

Whether you are working on a personal project, collaborating with a couple people on an idea, or shipping production level code, deployment carries a inherit level of stress, anxiety, tricks, traps, bugs, errors, issues, landmines and nightmares that might be difficult to figure out if you don’t know what you’re looking for.

With this blog I wanted to do something a little different and write about what I learned over the last 2 weeks from deploying my first React app called Spacebar Smasher.

I am not going to focus on specific technical details for specific hosts or services, but more…


CASE 009: SOS Spells Clean

Today we encounter a relatively simple sounding problem that deals with string coercion and Morse Code. On the surface it doesn’t sound to tricky, but as with many problems on LeetCode, it has a few catches that might get you caught up in finding a solution.

So, let’s get solving.

Here is a link to the problem on LeetCode

International Morse Code defines a standard encoding where each letter is mapped to a series of dots and dashes, as follows: “a” maps to “.-”, “b” maps to “-…”, “c” maps to “-.-.”, and so on.For convenience, the full table…


CASE 008: Parentheception

To go along with the last two problems we solve in this series, the problem we will attempt to tackle today is a fairly simple pattern matching exercise that has a few clever tricks up its sleeve.

It is also a problem that required a few chin strokes for me to figure out, so I felt like it would be a good idea to include it in this series.

So, let’s get solving.

Here is a link to the problem on LeetCode

A valid parentheses string is either empty (“”), “(” + A + “)”, or A + B, where…

Austin Smith

Software Engineer & Man About Town

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