CreatedAtAction is a helper function that is typically used in POST and creation API requests. This method is not new by any means but it seems that the days of plain Ok() and Created() are over as more and more people shift. But why do we need a fancy helper…
How To Capitalize Words In A Sentence (JavaScript)
Believe it or not, there is no magical method to capitalize words in a string. Not only is this a very common algorithm, but it is a common task. Just like the words in the title of this blog, sometimes capitalizing each word makes things look good! Using charAt() Happy…
Algorithm Patterns 101: Reversing Linked List
Linked List is a data structure which stores the data in a linear way. Unlike an array, data in a linked-list is non-contiguous (aka the data does not exist next to each other). Each element of a linked list contains a data field to store the list data and a…
Algorithm Patterns 101: Array Chunking
“Chunk” is one of the coolest words in the English language. Chunking is also a very useful algorithm technique where we split arrays into separate parts. Although there are many way to split an array, we are going to use a traditional for loop. Our pseudo code will look something…
Algorithm Patterns 101: Character Mapping
You will often be ask questions in interview settings that involve finding patterns within strings. In order to correctly track and correlate where characters exist, we need to use something called a character map. In this scenario, I am attempting to turn my name “Teddy” into a char map. While…
Sliding Window Algorithm Pattern Demystified: The Ultimate Guide to Efficient Problem-Solving
The sliding window technique is one of the most versatile tools in algorithmic problem-solving. From optimizing subarray and substring problems to solving real-world challenges efficiently, this technique helps reduce redundant computations, making it a cornerstone for competitive programming and technical interviews. Understanding the Concept What is the Sliding Window Technique?…
Algorithm Patterns 101: Fast and Slow Pointers

Similar to two pointers, fast and slow pointers use two pointers to traverse data structures. But this comes with one key difference, the pointers iterate at different speeds. The pointers can be used to traverse the array or list in either direct, BUT one must move faster than the other….
Algorithm Patterns 101: Two-Pointer

Two pointers is simply an alogorithm pattern that uses multiple pointers to iterate over a collection. What is a “pointer”? A pointer is just a number that stores where you are at. Almost like a bookmark, it keeps track and indexes the current place you are iterating. Why do we…
Builder Pattern Explained Simply

The Builder pattern is useful for creating complex objects that need step-by-step assembly. Or put more specifically, when a constructor just doesn’t do the trick anymore… Builders are incredibly common and you are already using them. For instance: Builders “chain together” methods and allow you to append method one after…
Iterator Pattern Explained Simply

An iterator is simply an object that is used to traverse a data structure. Unless you are working on an old Java code base, iterator patterns are going to be few and far between. Although rare, many of the features we take for granted exist because of this pattern. It’s…