© 2023 Hashnode

#dsa

Data Structures and Algorithms (DSA) are collections of tools used in computer science to solve problems. They can be applied to a wide range of industries, including tech, manufacturing, and healthca…

What is DSA Data Structures and Algorithms? DSA Data Structures and Algorithms is a collection of data structures and algorithms that can be used to solve various problems in computer science. It is o…

Types of Binary Tree. Full Binary Tree, Every Node with either 0 or 2 children. Complete Binary Tree, All levels are filled except the last level. The last level is filled from left to right. …

Here's a basic example of a linked list in JavaScript, with explanations at each step: kotlinCopy code// Define the Node class to represent each node in the linked list class Node { constructor(valu…

const nums = [2, 7, 11, 15]; const target = 9; const twoSum = function(nums, target) { const hashTable = {}; //created a hashtable for (let i = 0; i < nums.length; i++) { if (hashTable[t…

Problem Statement:- Given a m x n grid filled with non-negative numbers, find a path from top left to bottom right, which minimizes the sum of all numbers along its path. Note: You can only move eithe…

Most of the time you might have this question stuck in your mind why am I even doing Data Structures & Algorithms? It feels the same as banging your head in maths problems. Sometimes migraine shows of…

You can't build skyscrapers if you don't know how to build houses. Introduction Data Structures and Algorithms are the backbone of modern applications, and a solid understanding of these concepts is …

Searching algorithms are an essential part of computer science and programming. They allow us to efficiently find specific values in a collection of data. Two popular search algorithms are linear search and binary search. Linear Search: Lin…

Problem Statement:- You are given a directed graph of n nodes numbered from 0 to n - 1, where each node has at most one outgoing edge. The graph is represented with a given 0-indexed array edges of si…