Xander Billablogs.xanderbilla.com·Dec 12, 2023Introduction | Data Structure & AlgorithmIt is a mathematical and logical model of organizing the interrelated data is called data structure. Here, we have collection of that data must be interrelated and must be organized in an efficient manner which is predefined manner in a mathematical ...DiscussData Structure And Algorithmdata structures

Simon AsikaforUniAuth Blogblog.uniauth.com·Dec 4, 2023Using Nested Set Model to Build Hierarchical DataI've been using the Nested set model for a while in Windwalker Framework, as it's built into its core ORM package. However, I realized that there isn't much discussion about this model in the dev community. The Nested set model is a data model design...Discuss·38 readsnested set model

ROSHAN CSE0026roshanjha23.hashnode.dev·Nov 8, 2023Construct Binary Tree from Parent ArrayGiven an array of size N that can be used to represents a tree. The array indexes are values in tree nodes and array values give the parent node of that particular index (or node). The value of the root node index would always be -1 as there is no pa...DiscussBinary Search Algorithm

Ramandeep Singhramandeepsingh.hashnode.dev·Sep 17, 2023Binary Lifting - Calculating the Lowest Common AncestorHello everyone, I hope you are doing great, I am back with another blog in which I discussed a common category of problems involving trees, the problems seem tricky at first but solving these problems with the technique explained below becomes really...Discuss·143 readsTree

Preetika Prakashpreetikaprakash.hashnode.dev·Sep 11, 2023DSA Day 90/100Topic: Tree 1) Check for a balanced binary treeEasy Input: 1 / 2 \ 3 Output: 0 Explanation: The max difference in height of left subtree and right subtree is 2, which is greater than 1. Hence unbalanced class Tree { int ...Discuss100DaysOfCode

Preetika Prakashpreetikaprakash.hashnode.dev·Sep 10, 2023DSA Day 89/100Topic: Tree 1) Level order traversal in Spiral formEasy2) Zig Zag TraversalEasy3) Maximum Width of Binary TreeEasy4) Left view of Binary TreeEasy5) Right view of Binary TreeEasy Level order traversal in Spiral form Input: 10 / ...Discuss100DaysOfCode

Preetika Prakashpreetikaprakash.hashnode.dev·Sep 9, 2023DSA Day 88/100Topic: Tree 1) Level order traversal Line by LineEasy 1 / \ 2 3 / \ / \ 4 5 6 7 \ 8 1 $ 2 3 $ 4 5 6 7 $ 8 $. static ArrayList<ArrayList<Integer>> levelOrder(Node node) { ...Discuss100DaysOfCode

Haocheng Linhaochengcodedev.hashnode.dev·Sep 8, 2023[Data Structures 1] Search Binary Tree🧩Problem 💡: The search algorithm determines the node that contains the key from the binary search tree. public static nodetype search(nodetype tree, keytype keyin){ boolean found; nodetype p; p = tree; found = false; while (!...Discuss·1 likedatastructure

Preetika Prakashpreetikaprakash.hashnode.dev·Sep 8, 2023DSA Day 87/100Topic: Tree 1) Recursive Post Order TraversalEasy2) Iterative Pre-Order Traversal - GFGMedium RECURSION Input: 19 / \ 10 8 / \ 11 13 Output: 11 13 10 8 19 ArrayList<Integer> postOrder(Node root) { Arr...Discuss100DaysOfCode

Preetika Prakashpreetikaprakash.hashnode.dev·Sep 7, 2023DSA Day 86/100Topic: Tree 1) Size of Binary TreeEasy2) Minimum element in BSTEasy3) Sum of Binary TreeEasy4) Count leaves in a binary treeEasy5) Count Non-leaf nodes in a binary treeEasy6) Maximum Depth Of Binary TreeEasy Size of Binary Tree Input : Testcase 2:...Discuss100DaysOfCode