Image for post
Image for post
Photo by Girl with red hat on Unsplash

Binary search is an important search algorithm. It is an efficient method to search for a specific element within a sorted array. While it’s a pretty simple and intuitive concept, it is a powerful tool and one worth getting deeply familiar with.

Conceptual Overview

Binary search works by taking in an array sorted in ascending order and determining the middle element of the array. It then compares this middle element to the element you are searching for. If the element you are looking for happens to be the middle element of the array, then you’ve found the element in O(1)…


Image for post
Image for post
Photo by Laura Ockel on Unsplash

The only way to get better at algorithms is through consistency and practice — so let’s jump right back in to another algorithm practice. This week, we’re going to take a look at the validate subsequence algorithm. This is an algorithm that is quite common and relatively straight-forward, so it’s a good one to practice with if you’re just starting out with algorithms.

Let’s take a look at the problem:

Given two non-empty arrays of integers, determine if the second array is a valid subsequence of the first array.

Note that both a single number in an array as well as the array itself are valid subsequences of the array.

Before we dive in to the problem, let’s first…


Image for post
Image for post
Photo by Jeremy Bishop on Unsplash

Data structures are the cornerstone of algorithms. In order to write and run efficient code, you must possess a solid understanding of data structures. Once you have a good grasp on different data structures and how they work, you can start to identify the pros and cons of specific data structures and then make an informed decision as to when and where they should be implemented.

A binary search tree — commonly referred to in its shortened form, BST — is a data structure that allows for the efficient storage of integers in an ordered fashion. Binary search trees are…


Happy 2021! It’s a new year and a fresh start, and we’re diving right back in to mastering algorithms.

I have been busy preparing for upcoming interviews and doubling down on getting algorithm practice in, so this week, let’s get in to the third iteration of the Algorithm Practice series.

Image for post
Image for post
Photo by timJ on Unsplash

Product Sum

This week, we will do a walkthrough of the Product Sum algorithm problem. It is another algorithm that often comes up during technical interviews. Given an array, our task is to write a function that returns its product sum.

Some things to clarify before we get in to thinking about…


The Caesar Cipher Encryptor is next up in our series of algorithm problem walkthroughs. Classified as an “easy” algorithm on websites like Leetcode, this is another classic problem that comes up often in technical interviews and is good practice for any Software Engineer looking to brush up on their problem-solving skills.

Image for post
Image for post
Src: IBM Community

Background Information

First, some background information on the Caesar Cipher so we know what we’re dealing with.The Caesar Cipher is a simple example of cryptography, which is defined by Merriam-Webster as: the enciphering and deciphering of messages in secret code or cipher.

Also: the computerized encoding and decoding of information.

The…


Image for post
Image for post
Photo by Joshua Sortino on Unsplash

Here’s a classic algorithm problem that comes up quite often in technical interviews: given a string, how can we check whether it is a palindrome or not?

Before we dive in to the problem itself, let’s step back for a second and go over what a palindrome is. A palindrome is a string that reads the same forwards and backwards. The classic example is “racecar” — read backwards, the string is still “racecar”.

Now that we are clear on the concept of the palindrome, let’s get in to the algorithm and how to approach solving it: Given a non-empty string…


A Quick Dive Into Stacks

Image for post
Image for post
Photo by Tobias Fischer on Unsplash

Data Structures: Why Should We Care?

The first step in understanding and excelling at algorithms is having deep knowledge of data structures. Data structures are the foundation of Computer Science and Software Engineering, and as such, we have to have a good grasp of the basics of the most common data structures in order to be good at what we do.

While it might be intuitive, it is helpful for us to pause here and review what a data structure actually is. At the very basic level, a data structure is a way of storing…


Image for post
Image for post
Src: Amazon Web Resources

When developing an application, a common issue that developers run into is one involving CORS. This is an issue that is quite frustrating when it comes up — you’ve spent hours coding, testing, and cleaning up your code, only to find that CORS is blocking a request that your application depends on to run. Luckily, the issue is one that is well-documented and not too hard to fix.

What is CORS?

CORS stands for Cross-Origin Resource Sharing and it is a security policy that handles the way in which requests for resources from external origins are managed. The main purpose…


Image for post
Image for post
Src: Hubtype

Nowadays, when you log on to any website, chances are that you’ll come across a chatbot. Chatbots are widely used across web applications in order to perform tasks — such as greeting customers and providing answers to frequently asked questions — that were once relegated to human beings.

Today’s chatbots are surprisingly complex, intelligent, and efficient, making them a no-brainer for most websites. While the AI and machine learning that goes in to chatbots are increasingly complicated, the task of building and customizing your own chatbot has become easier than ever. …


A Review of OOP and Its Core Principles

Image for post
Image for post
Photo by Eric Prouzet on Unsplash

What is OOP?

Object-oriented programming, often referred to as just OOP, is a programming pattern that revolves around the concept of objects. Objects are bundles of code that contain attributes and have behaviors in the form of methods. This idea of objects allows us to create applications that more closely mimic the way the real world works. OOP allows us to structure our code in a way that makes it possible to reuse our code and easily share functionality throughout an application.

Classes as Blueprints

In OOP, classes are an important concept…

Cindy Kei

Fullstack Software Engineer based in NYC. Passionate about creating social change and making a difference through innovative, powerful technologies.

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