© 2023 Hashnode
#datastructure
Given a nested array, write a code to extract all the values from the display into a single-dimensional array. //Example. const input = [1, [2, [3, 4], 5], 6] const output = flattenArray(input) consol…
Intuition After seeing the problem statement, I thought of the best one HashMap :)To store the frequency of one string and compare that with another string's frequency. However, we can also minimize t…
As a programmer, you probably spent the early days of your career analyzing code syntax and package libraries, and learning the latest in your chosen discipline. But what do you need to know about dat…
Discover the power of linked lists in constructing binary trees. In this comprehensive guide, we'll walk you through the step-by-step process, whether you're a beginner or an experienced programmer. U…
Programming in its simplest form is a way to solve problems with code, including simple ones that take a few lines of code to solve and complex ones that take a whole project. However, both solutions …
This is my second article on data structures and algorithms series. In this article, you will learn about linear and binary search algorithms, their implementation in javascript and their time complex…
This is my first article on data structures and algorithms series. In this article, you will learn about algorithms, their characteristics, time and space complexities, how to determine them by lookin…
Why Binary Search? as you know Napoleon and Hitler both used the Divide-and-Conquer strategy to achieve their goals. This strategy involves dividing their enemies into smaller, more manageable groups …
Tree traversal is the process of visiting and processing each node in a tree data structure. There are two main types of tree traversal: depth-first traversal and breadth-first traversal. Depth-First …
Original article is available on my website: https://promisefemi.vercel.app/blog/data-structures-singly-linked-list The illusive data structures, in this series i would be explaining individual data …