Aditya Jadhavjadhavaditya.tech·Jan 28, 2024Data structures and algorithmsWhat is Data Structure? A data structure is defined as a particular way of storing and organizing data in our devices to use the data efficiently and effectively. The main idea behind using data structures is to minimize the time and space complexiti...Discussporblem solving
Kallol Bairagikallolbairagi.hashnode.dev·Oct 21, 2023#102.Binary Tree Level Order Traversal [LeetCode Grind 75 in Java]class Solution { public List<List<Integer>> levelOrder(TreeNode root) { List<List<Integer>> ans = new ArrayList<List<Integer>>(); Queue<TreeNode> queue = new LinkedList<>(); queue.add(root); if(root == null) retu...DiscussLeetCode Grind 75 in JavaDSA
Kallol Bairagikallolbairagi.hashnode.dev·Oct 16, 2023#235.Lowest Common Ancestor of a Binary Search Tree [LeetCode Grind 75 in Java]class Solution { public TreeNode lowestCommonAncestor(TreeNode root, TreeNode p, TreeNode q) { //check on the left side if(root.val > p.val && root.val > q.val) return lowestCommonAncestor(root.left, p, q); //c...DiscussLeetCode Grind 75 in JavaDSA
Kallol Bairagikallolbairagi.hashnode.dev·Oct 8, 2023#104.Maximum Depth of Binary Tree [LeetCode Grind 75 in Java]class Solution { public int maxDepth(TreeNode root) { if(root == null) return 0; //BFS traversal Queue<TreeNode> q = new LinkedList<TreeNode>(); q.add(root); int depth = 0; while(!q.isEmpty()){ ...DiscussLeetCode Grind 75 in JavaDSA
Kelyn Njeriblog.kelynnjeri.me·Oct 1, 2023A Theoretical Guide To Trees - Part 1Introduction Trees are fundamental data structures used in computer science and software engineering to represent hierarchical relationships between objects. This comprehensive guide aims to provide a practical understanding of trees, their essential...Discuss·388 readsData Structure And Algorithmsdata structures
Preetika Prakashpreetikaprakash.hashnode.dev·Aug 29, 2023DSA Day 83/100Topic: Tree 1) Determine if Two Trees are IdenticalEasy RECURSIVE SOLUTION Input: 1 1 / \ / \ 2 3 2 3 Output: Yes Explanation: There are two trees both having 3 nodes and 2 edges, both trees are identical havin...Discuss100DaysOfCode
Pranav Masekarsungod.hashnode.dev·Aug 13, 2023Beyond Widgets: Navigating the Realm of Render Objects in FlutterIntroduction : Welcome to a fascinating journey into the heart of Flutter's UI magic! In this blog, we are going to the world beyond widgets. This other world is the world of Render Objects. As Flutter developers, we know how important widgets are fo...Discuss·197 readsFlutterWeMakeDevs
Pratham Sunnalpixelprose.hashnode.dev·Aug 3, 2023Binary TreesA tree data structure is a hierarchical structure that is used to represent and organize data in a way that is easy to navigate and search. It is a collection of nodes that are connected by edges and has a hierarchical relationship between the nodes....DiscussBinaryTrees
Atharva legolas12.hashnode.dev·Jul 10, 2023Daily Dose of DSA - Day 23https://leetcode.com/problems/binary-tree-inorder-traversal/description/ Using Recursion : The inorder function is a recursive helper function that takes a TreeNode* parameter representing the current node during traversal. If the current node is N...DiscussC++
Atharva legolas12.hashnode.dev·Jul 10, 2023Daily Dose of DSA - Day 22Question Link: https://leetcode.com/problems/binary-tree-preorder-traversal/description/ Using Recursion : The preorder function is a recursive helper function that takes a TreeNode* parameter representing the current node during traversal. If the ...Discuss·46 readsTrees