JNAYEH Sirinesirinejnayeh.hashnode.dev·a day agoBinary Lifting: My First Time Applying DP on Binary TreesBinary lifting is causing a revolution in tree-based computations, offering a clever way to handle complex tree queries efficiently. This dynamic programming approach allows for quick navigation through tree structures, making it a game-changer for v...DiscussBinaryTrees
Anower Hossainanower77.hashnode.dev·Jul 14, 2024Segment Tree-1Segment Tree Basic Node Divide With Segment Tree Node Numbering (Segment Tree) // build (node, begin, end) build (1, 1, N) { L = 2xN, R = (2xN) + 1 // Node Number Calculate mid = (begin + end) / 2 left = (L, begin, mid) left = (R, ...Discuss·91 readssegment-tree
Akshaya Biswalakshaya-biswal.hashnode.dev·Jun 27, 2024Binary TreeA binary tree is a tree data structure where each parent node can have up to two children. All the nodes in the left subtree of a node have values smaller than the node's value. All the nodes in the right subtree of a node have values greater than...DiscussData StructureDSA
Marcos Motamarcosmota.com·Jun 26, 2024Implement a Binary Tree in GolangThe biggest challenge in Computer Science is transforming a data structure that has a complexity of O(n) to O(log n), this is not an easy journey. In this post we will discover how the binary tree does this (at least tries to) and implement this data...Discussgolang
Arbash Hussaincckeh.hashnode.dev·Jun 8, 2024A Step-by-Step Guide to Decision Trees in Machine LearningIntroduction Welcome back, everyone! Apologies for the delay in continuing our ML algorithms series that started on January 1, 2024. But no worries, we are back on track and ready to speed things up! From now on, I’ll be uploading one machine learnin...DiscussMachine LearningDecision Tree
Niko Strongioglouamemoiroffailures.hashnode.dev·Jun 3, 2024Projection of a binary tree on the x-axisThis was a problem I was given on the first phone screening with Amazon. This was the second time I was going through the interview process with Amazon for a Software Engineering opening. The problem statement more or less is the one on the title but...Discussalgorithms
Alex Hernandezblog.ahernandez.dev·May 28, 2024Coding Interview Prep: Binary Tree Maximum Path SumHere we will go over Leetcode problem 124: Binary Tree Maximum Path Sum The steps we must follow are: Define a helper function that calculates the maximum path sum with the highest node being the root of the path and updates the global maximum path ...Discuss·41 readsCoding Interview PrepGo Language
Alex Hernandezblog.ahernandez.dev·May 28, 2024Coding Interview Prep: BST Serialization in JavaWhy Serialize a BST? Serialization is converting a data structure into bits the purposes of storing the data in memory or as a file for later retrieval, or to use less space when transmitting it across a network connection. A Binary Search Tree (BST)...DiscussCoding Interview Prepinterview questions
Alex Hernandezblog.ahernandez.dev·May 27, 2024Coding Interview Prep: BST SerializationWhy Serialize a BST? Serialization is converting a data structure into bits the purposes of storing the data in memory or as a file for later retrieval, or to use less space when transmitting it across a network connection. A Binary Search Tree (BST)...DiscussCoding Interview Prepinterview preparations
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...DiscussPython