Kumar Spandan Pattanayak5p7ro0t.hashnode.dev·14 hours agoSolving Leetcode 2872: Find the Maximum K-Divisible ComponentsLeetcode Question Link: https://leetcode.com/problems/maximum-number-of-k-divisible-components/description/ Intuition Initially, I thought of approaching it with array and tree traversal but didn't think of any other method. I got struck on how to pr...Python
Pawan Gangwaniblogs.pgangwani.co.in·Nov 11, 2024Crafting Graphs in TypeScript: A Comprehensive Guide to Building and Traversing Data StructuresGraphs are powerful data structures used to model relationships in data, from social networks and navigation systems to dependency tracking and recommendation engines. In this guide, we’ll create a graph in TypeScript, implementing basic operations l...Tutorial
Chetan Dattachetan77.hashnode.dev·Oct 27, 2024Diameter of Binary TreeProblem Given the root of a binary tree, return the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path between any two nodes in a tree. This path may or may not pass through the root. The length of a p...Leetcodediameter-of-binary-tree
Michael Strombergmjstromberg.hashnode.dev·Oct 19, 2024Solving the “Number of Islands” Problem in JavaScriptPhoto by Cyrus Crossan on Unsplash Algorithmic problem-solving is central to coding interviews, especially for software engineering roles at major tech companies like Google, Facebook, and Amazon. While these challenges might not fully reflect day-to...AlgorithmsJavaScript
Drake Phamtopological-sort.hashnode.dev·Sep 28, 2024Topological Sort: Understanding the Concept and 2 ApplicationsTopological Sorting is an important concept in graph theory, especially for Directed Acyclic Graphs (DAGs). It gives a linear order of vertices so that for every directed edge u → v, vertex u comes before v in the order. This is useful when tasks or ...algorithms
Chetan Dattachetan77.hashnode.dev·Sep 21, 2024Binary Trees | Types | BFS | DFSIntroduction Arrays and linked lists are flat structures, whereas a tree is a hierarchical structure. If a tree has only 2 children, then it is called a binary tree. Terminology Root: The head of the tree is called the root node. Leaf node: A n...Leetcodetraversals
Raineraineyang.hashnode.dev·Aug 9, 2024PyTA Project: Augment CFG Edges with Z3 ConstraintsToday's task requires a combination of various components of PythonTA introduced in previous articles, including control flow graph module, Z3 visitor, and Z3 expression wrapper. In this task, we will augment each control flow graph edge with a list ...Python
Michael Pipermichaelpiper.hashnode.dev·Jul 30, 2024Understanding Binary Search, DFS, BFS, and Sliding Window with Sample Code in JavaLet's explore these fundamental algorithms and techniques using Java. 1. Binary Search Binary Search is an efficient algorithm for finding an item from a sorted list of items. It works by repeatedly dividing in half the portion of the list that could...31 readsalgorithms
Vineeth Chivukulavineethchivukula.hashnode.dev·Jun 29, 2024Understanding Depth-First SearchDepth-First Search (DFS) is a traversal technique used in graph data structures that explores each branch as far as possible before backtracking. This technique is often implemented using a stack data structure or through recursion. Process Initial...DFS
Tapan Rachchhtapanrachchh.hashnode.dev·May 18, 2024979. Distribute Coins in Binary Tree# Definition for a binary tree node. # class TreeNode: # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution: def distributeCoins(self, root: Option...Python