techiehub.in

The Art of Array Concatenation: From One-Liners to High Performance

In modern JavaScript, there are often several ways to achieve the same result. A common LeetCode problem, Concatenation of Array, asks us to take an array nums and return a new array that is twice as long, consisting of nums followed by nums. While the task is simple, the way we solve it reveals a […]

January 7, 2026 | Data Structure, Javascript | No comments

From Maps to Memory: Optimizing the “Valid Anagram” Problem in JavaScript

The Valid Anagram problem is a classic interview challenge that tests your ability to manage data frequency. While there are many ways to solve it, the journey from using a flexible Map to a high-performance Int32Array reveals a lot about how JavaScript works under the hood. 1. The Foundation: Using a JavaScript Map The most […]

January 7, 2026 | Data Structure, Javascript | No comments

Categories