Data Structure
  • টাইম এন্ড স্পেস কমপ্লেক্সিটি
    • সূচনা
    • টাইম কমপ্লেক্সিটি
    • O(N) টাইম কমপ্লেক্সিটি
    • O(logN) টাইম কমপ্লেক্সিটি
    • O(sqrt(N)) টাইম কমপ্লেক্সিটি
    • টাইম কমপ্লেক্সিটির কিছু উদাহরন
    • টাইম কমপ্লেক্সিটি থেকে টাইম ক্যালকুলেট করা
    • স্পেস কমপ্লেক্সিটি
  • মডিউল ২ঃ STL Vector
    • ২-০ঃ সূচনা
    • ২-১ঃ ভেক্টর ইনিশিয়ালাইজেশন এবং কন্সট্রাক্টর
    • ২-২ঃ ভেক্টর ক্যাপাসিটি ফাংশন
    • ২-৩ঃ ভেক্টর মডিফাইয়ার ফাংশন -১
    • ২-৪ঃ ভেক্টর মডিফাইয়ার ফাংশন -২
    • ২-৫ঃ ভেক্টর এক্সেস এবং ইটারেটর
    • ২-৬ঃ ভেক্টরে ইনপুট নেয়া
    • ২-৭ঃ স্ট্রিং এর ভেক্টর
  • Prefix Sum and Binary Search
    • সূচনা
    • Range Sum Query (Codeforces)
    • Prefix Sum পরিচিতি
    • Prefix sum ইমপ্লিমেন্টেশন
    • Binary Search (Codeforces)
    • বাইনারি সার্চ পরিচিতি
    • বাইনারি সার্চ ইমপ্লিমেন্টেশন
  • মডিউল ৫ঃ Singly Linked List
    • ৫-০ঃ সূচনা
    • ৫-১ঃ Linked List কেন?
    • ৫-২ঃ Linked List কেন? (পার্ট ২)
    • ৫-৩ঃ Create a Node
    • ৫-৪ঃ Constructor of Node
    • ৫-৫ঃ Dynamic Node
    • ৫-৬ঃ Singly Linked List কিভাবে তৈরি হয়
    • ৫-৭ঃ Printing Singly Linked List
    • ৫-৮ঃ Printing Singly Linked List (Animated)
  • মডিউল ৬ঃ Singly Linked List Operation
    • ৬-০ঃ সূচনা
    • ৬-১ঃ পয়েন্টারের রেফারেন্স
    • ৬-২ঃ Tail এ ভ্যালু Insertion
    • ৬-৩ঃ যেকোন পজিশনে ভ্যালু Insertion
    • ৬-৪ঃ Head এ ভ্যালু Insertion
    • ৬-৫ঃ যেকোন পজিশনের ভ্যালু Deletion
    • ৬-৬ঃ Head ডিলিট
    • ৬-৭ঃ Error Handling
    • ৬-৮ঃ Singly Linked List এ ইনপুট
  • মডিউল ৭ঃ Singly Linked List recap
    • ৭-০ঃ সূচনা
    • ৭-১ঃ Singly Linked List recap
    • ৭-২ঃ Insert at Singly Linked List Recap
    • ৭-৩ঃ Insert at Head and Tail at Singly Linked List Recap
    • ৭-৪ঃ Delete from Singly Linked List Recap
    • ৭-৫ঃ Delete Head from Singly Linked List Recap
    • ৭-৬ঃ Take Singly Linked List Input Recap
    • ৭-৭ঃ Printing Singly Linked List in Reverse
    • ৭-৮ঃ Sort Singly Linked List
    • ৭-বোনাসঃ Singly Linked list all operations complexity analysis
  • মডিউল ৯: Doubly Linked List
    • ৯-০ঃ সূচনা
    • ৯ -১ঃ Doubly Linked List
    • ৯-২ঃ Doubly Linked List দেখতে কেমন?
    • ৯-৩ঃ Doubly Linked List এর যেকোনো position এ value insert
    • ৯-৪ঃ Insert at Head and Tail in Doubly Linked List
    • ৯-৫ঃ Insert Operation on Doubly Linked List Animated
    • ৯-৬ঃ Delete Operations on Doubly Linked List
    • ৯-৭ঃ Complexity Analysis
    • মডিউল ৯-৮ঃ Doubly Linked List এ input নেয়া
  • মডিউল ১০: STL List and Cycle Detection
    • ১০-০ঃ সূচনা
    • ১০-১ঃ List Constructors
    • ১০-২ঃ List Capacity Functions
    • ১০-৩ঃ List Modifiers Functions
    • ১০-৪ঃ List Operations and Access Related Function
    • ১০-৫ , ১০-৬ঃ Reverse a Singly Linked List
    • ১০-৭ঃ Reverse a Doubly Linked List
    • ১০-৮ঃ Detect Cycle in Singly Linked List
  • মডিউল ১১ঃ Problem Solving using Linked list
    • মডিউল ১১-০ঃ সূচনা
    • মডিউল ১১-১ঃ Middle of the Linked List
    • মডিউল ১১-২ঃ Linked List Cycle
    • মডিউল ১১-৩ঃ Remove Duplicate from Sorted List
    • মডিউল ১১-৪ঃ Reverse Linked List
    • মডিউল ১১-৫ঃ Palindrome Linked List
    • মডিউল ১১-৬ঃ Delete Node in a Linked List
  • Module 13: Stack Implementation and STL
    • মডিউল ১৩-০ঃ সূচনা
    • মডিউল ১৩-১ঃ What is stack (animation)
    • মডিউল ১৩-২,৩ঃ What is stack
    • মডিউল ১৩- ৪,৫ঃ Stack Implement using Array
    • মডিউল ১৩-৬ঃ Stack Implement using List
    • মডিউল ১৩-৭ঃ Stack Implement using Doubly Linked List
    • মডিউল ১৩-৮ঃ STL Stack
  • মডিউল ১৪ঃ Queue Implmentation and STL
    • ১৪-০ঃ সূচনা
    • ১৪-১,১৪-২ঃ Queue কী এবং Queue এর কিছু বাস্তব উদাহরণ
    • ১৪-৩ঃ Singly Linked List এর সাহায্যে Queue তৈরি করা
    • ১৪-৪ঃ Doubly Linked List এর সাহায্যে Queue তৈরি করা
    • ১৪-৫ঃ STL List এর সাহায্যে Queue তৈরি করা
    • ১৪-৬ঃ Queue এর STL লাইব্রেরি
    • ১৪-৭ঃImplement Stack using Queue (Leetcode)
    • ১৪-৮ঃ Implement Queue using Stacks (Leetcode)
  • মডিউল ১৫ঃ Problem Solving using Stack & Queue
    • মডিউল ১৫-০ঃ সূচনা
    • মডিউল ১৫-১ঃ Valid Parentheses (Leetcode)
    • মডিউল ১৫-২ঃ Backspace String Compare (Leetcode)
    • মডিউল ১৫-৩ঃ Insert Element At Bottom of Stack (CodingNinjas)
    • মডিউল ১৫-৪ঃ Maximum Equal Stack Sum (CodingNinjas)
    • মডিউল ১৫-৫ঃ Reversing a Queue (CodingNinjas)
    • মডিউল ১৫-৬ঃ Reverse Stack Using Recursion (CodingNinjas)
  • মডিউল ১৭: Binary Tree Implementation
    • মডিউল ১৭-০ঃ সূচনা
    • মডিউল ১৭-১ঃ Discussion about Tree Data Structure
    • মডিউল ১৭-৩ঃ Discussion about Binary Tree
    • মডিউল ১৭- ৪ঃ Create a Binary Tree
    • মডিউল ১৭-৫ঃ Pre Order Traversal of Binary Tree
    • মডিউল ১৭-৭ঃ Post Order Traversal of Binary Tree
    • মডিউল ১৭-৮ঃ In Order Traversal of Binary Tree
  • মডিউল ১৮ঃ Operations On Binary Tree
    • ১৮-০ঃ সূচনা
    • ১৮-১ঃ Level Order Traversal of Binary Tree থিওরি
    • ১৮-২ঃ Level Order Traversal of Binary Tree ইমপ্লিমেন্টেশন
    • ১৮-৩ঃ Binary Tree Input থিওরি
    • ১৮-৪ঃ Binary Tree Input ইমপ্লিমেন্টেশন
    • ১৮-৫ঃ Count Number of Nodes of a Binary Tree
    • ১৮-৬ঃ Count Number of Leaf Nodes of a Binary Tree
    • মডিউল ১৮-৭ঃGet the Maximum Height of a Binary Tree
  • মডিউল ১৯ঃ Problem Solving using Binary Tree
    • মডিউল ১৯-০ঃ সূচনা
    • মডিউল ১৯-১ঃ Is Node Present (Coding Ninjas)
    • মডিউল ১৯-২ঃ STL Pair, Node Level (Coding Ninjas)
    • মডিউল ১৯-৩ঃ Left View Of a Binary Tree (Coding Ninjas)
    • মডিউল ১৯-৪ঃ Diameter Of Binary Tree (Coding Ninjas)
    • মডিউল ১৯-৫ঃ Special Binary Tree (Coding Ninjas)
    • মডিউল ১৯-৬ঃ Reverse Level Order Traversal (Coding Ninjas)
  • মডিউল ২১ঃ Binary Search Tree Implementation
    • মডিউল ২১-০ঃ সূচনা
    • মডিউল ১৭-১ঃ What is BST
    • মডিউল ২১-২ঃ How to Handle Duplicate in BST
    • মডিউল ২১-৩ঃ Search in BST
    • মডিউল ২১-৫ঃ Insert in BST
    • মডিউল ২১-৭ঃ Convert Array to BST
  • মডিউল ২২ঃ Heap Implmentation
    • ২২-০ঃ সূচনা
    • ২২-১ঃ Complete Binary Tree কী
    • ২২-২ঃ Complete Binary Tree এর Array Representation
    • ২২-৩ঃ Heap কী
    • ২২-৪ঃ Heap এ Insertion এর থিওরি
    • ২২-৫ঃ Heap এ Insertion ইমপ্লিমেন্টেশন
    • ২২-৬ঃ Heap এ Deletion থিওরি
    • ২২-৭ঃ Heap এ Deletion ইমপ্লিমেন্টেশন
  • মডিউল ২৩ঃ STL Priority Queue, Map and Set
    • মডিউল ২৩-০ঃ সূচনা
    • মডিউল ২৩-১ঃ Priority Queue কি?
    • মডিউল ২৩-২ঃ কিভাবে STL Priority Queue কাজ করে
    • মডিউল ২৩-৩ঃ Custom Compare Class for Priority Queue
    • মডিউল ২৩-৪ঃ map কি?
    • মডিউল ২৩-৫ঃ কিভাবে STL map কাজ করে
    • মডিউল ২৩-৬ঃ Count Words in a String using Map
    • মডিউল ২৩-৭ঃ কিভাবে STL set কাজ করে
Powered by GitBook
On this page
  1. মডিউল ১৭: Binary Tree Implementation

মডিউল ১৭-৩ঃ Discussion about Binary Tree

Previousমডিউল ১৭-১ঃ Discussion about Tree Data StructureNextমডিউল ১৭- ৪ঃ Create a Binary Tree

Last updated 9 months ago

এই module এ আমরা Binary Tree এর সম্পর্কে জানবো. Binary Tree হলো এমন একটি Tree যাতে একটি root এর অধীনে শুধু ২ টি node/child থাকতে পারবে। এইটা অনেকটা doubly linked list এর মতো শোনায় কিন্তু এখানে ব্যাপারটা একটু ভিন্ন। binary tree এর বেলায় root node এর অধীনে দুইটি child node থাকতে পারে আর প্রতিটি, child node or branch node এর অধীনেও আরো দুইটি child node থাকতে পারে কিন্তু প্রতিটি child এর parent or root node থাকবে একটি।

Binary Tree একটি non-linear data structure. (non-linear data structure হলো এমন কিছু data structure যারা কোনো sequence maintain না করে একটা hierarchically maintain করে চলে। যেমনঃ map, binary tree, graph ইত্যাদি।)

এ Binary Tree এর সম্পর্কে আরো ভালোভাবে যেনে নেই। binary tree এর প্রতিটি node এর ৩ টি অংশ আছে ১ টি হলো value (int/string/float/), ১ টি left node, ১ টি right node. এবার একটি binary tree graphically দেখে নেই।