© 2022 Hashnode

Overview In this article I am going to walk through an array sorting algorithm called "Insertion sort" in short and clear steps; hopefully to help you understand more how sorting algorithms work in Py…

Recursion is a computational tool that involves an element calling upon itself. While recursion is often an unnecessarily taxing approach in terms of CPU demand, it can offer an elegant, efficient, an…

Hello, I am Dhruvan. I am a developer, and you should know that I’m a big fan of data structures and algorithms. If you can relate to this, don’t worry; after working on many projects (small and large…

Prompt You are given an array prices where prices[i] is the price of a given stock on the ith day. You want to maximize your profit by choosing a single day to buy one stock and choosing a different d…

Reservoir Sampling Normally, its very simple to choose an element randomly from an array. Just generate a random index from [0, array_length-1]: const arr = ["a", "b", "c", "d", "e"]; const idx = ~~(M…

BigO notation is simplified analysis of an algorithm's efficiency. Nói đơn giản BigO cho chúng ta biết độ phức tạp của thật toán với kích thước đầu vào là n. Nó cung cấp cho chúng ta một cách trừu tư…

A stablecoin is a digital currency that is pegged to a "stable" reserve asset like the U.S. dollar or gold. Stablecoins are designed to reduce volatility relative to unpegged cryptocurrencies like Bit…

What is a Stack? Stack is a linear data structure that stores it's elements in sequential order similar to Arrays. When adding or removing elements, it follows a particular order called LIFO - which i…

In programming, there can be a thousand and one ways to solve a problem. Let's imagine you want to know if a number is even or odd. To check for even, choose whether the number ends in zero or is div…

About me I'm the type of 🧑🏻 person that you can ask anything related to 💻 Computer Science and programming, and answer them by either sharing resources or sharing my thought process on it and if I …