Threaded Binary Tree
Duration: 15 min
This video lesson is available to enrolled students.
Inside: a video lesson and guided study material.
Module outline
- About the Course: About the Course
- Section 1 | Language (Hindi): भाषा, लिपि, ध्वनि, वर्ण, अक्षर, स्वर, व्यंजन, मात्रा और संयुक्ताक्षर, वर्तनी, वर्ण-विन्यास, अनुस्वार, अनुनासिक, चंद्रबिंदु और ‘र’ के रूप, शब्द, पद और शब्द-भेद, संज्ञा और सर्वनाम, विशेषण और क्रिया, लिंग, वचन, पुरुष और कारक, काल, वाच्य, वाक्य और वाक्य-भेद, संधि, समास, विलोम शब्द, पर्यायवाची शब्द, सामान्य अशुद्धियाँ, अनेक शब्दों के लिए एक शब्द, मुहावरे और लोकोक्तियाँ, अपठित गद्यांश और अपठित पद्यांश, Multi-Topic Content (Cross-Concept Material), वर्णमाला
- Section 1 | Language (उर्दू भाषा — 22 प्रश्न (निश्चित)): Spelling & Diacritics, Grammar (اسم, فعل, صفت, ضمیر), Vocabulary, Idioms & Proverbs, Comprehension
- Section 1 | Language (বাংলা / बांग्ला भाषा — 22 प्रश्न (निश्चित)): Bangla Script and Sounds, Bangla Grammar and Usage, Bangla Word Formation and Vocabulary, Reading and Text Interpretation
- Section 1 | Language (English): Vocabulary, Noun, Subject Verb Agreement (Verb Noun Agreement), Adjectives, Tenses, Pronoun, Verb, Adverb, Preposition, Articles, Determiner, Conjunction, Modals, Active Passive Voice (Voice), Direct and Indirect Speech, Sentence Correction (Error Correction), Sentence Completion (Fill in the blanks), Sentence Construction, Sentence Re-arrangements (Para Jumbles) (Narrative Sequencing), Comprehension / Reading Comprehension / Unseen Passages (Critical Reasoning) (Paragraph Questions), Cloze Test (Cloze Passage), Verbal Analogy (Word Based Analogy), Facts, Inference and Judgements
- Section 2 | Primary Maths & Reasoning: Ratio and Proportion (Ratios), Divisibility Rules, Mixture and Alligation, Permutation and Combination, Number System, HCF LCM, Sequence and Series (Series), Speed Time and Distance, Series (Number and Letter Series) (Numerical Relations and Reasoning), Coding Decoding, Non Verbal Reasoning (Spatial Aptitude) (Spatial Reasoning) (Visual Reasoning), Percentage, Average, Profit and Loss, Simple Interest and Compound Interest, Time and Work, Mensuration and Geometry, Age Problems, Arithmetic, Powers and Exponents (Surds and Indices), Algebra, Probability, Trigonometry, Syllogisms, Seating Arrangements, Blood Relations, Directions (Direction Test), Analytical Reasoning (Counting Figures Reasoning), Puzzle Solving (Puzzles), Calendar, Clock, Cubes & Dices, Venn Diagram, Data Arrangement, Inequality, Analogy, Ranking, Order and Sequence
- Section 2 | General Awareness (GK + Current Affairs): Polity, Physics, Biology, State Wise GK, Chemistry, History, Geography, Indian Economy, Environment, GK- Current Affairs, Static General Knowledge
- Section 3 | Computer System and Org. (CSO): Basics of COA, Floating Point Rep, Cache Memory Organization, Instr Formats & Modes, Programming the Basic Computer, Input Output Organisation, Register Transfer and Microoperations, Control Unit Design
- Section 3 | Database Management System: Basics of DBMS, ER Diagram, Relational Model & Functional Dependencies, Keys & Integrity Constraints, Normalization (1NF - BCNF), Decomposition Properties & 4NF, SQL, File Organization & Indexing, Relational Algebra, Relational Calculus, Transaction Management, Concurrency Control
- Section 3 | Operating System: Introduction to OS, Process Management, CPU Scheduling, Threads & Process Creation, Memory Management, Virtual Memory, Disc Scheduling, File Management, Process Synchronization
- Section 3 | Computer Networks: Introduction to CN, Data Communication, DLL: Access Control, DLL: Flow Control, DLL: Error Control, Data Link Layer - Ethernet, Net Layer: IPv4 & Proto, Net Layer: IP Addressing, Transport Layer Services, TL: Congestion & UDP, Application Layer, Hardware basics
- Section 3 | Data Structures: Introduction to DS, Array, Stack, Queue, Linked List, Tree, Graphs, Hashing, Algorithm Analysis, Time Complexity Analysis, Sorting Algorithms, Greedy Algorithms, Minimum Spanning Trees, Shortest Path Algos
- Section 3 | Theory Of Computation & Compiler Design: Introduction to TOC, Deterministic FA (DFA), Non-Deterministic FA, Regular Expressions, Grammar, Regular Language Properties, Moore & Mealy Machines, Pushdown Automata & CFG, Turing Machines, Intro to Compilers, Lexical Analysis, Grammar & CFG, Syntax Analysis: Top-Down, Syntax Analysis: Bottom-Up, Semantic Analysis & SDT, Intermediate Code Gen, Code Optimization
- Section 3 | Emerging Trends (AI, Societal Ethics & MS Office): Artificial Intelligence, Emerging Tech Trends, Society, Law & Ethics, MS Office Applications
- Section 3 | Software Engineering: Fundamentals of Software Engineering, Software Requirements and Quality Assurance, Software Design, Estimation and Metrics, Software Maintenance and Configuration Management, Software Testing
- Section 3 | C Programming: C Fundamentals, Control Flow, Functions, Arrays & Pointers, Storage Classes, Structures & Enums, DMA, Macros, Scoping & File Handling
- Section 3 | OOPS, C++, JAVA, HTML: OOPS with C++, Java, HTML Basics, CSS
- Section 3 | Java: Java Fundamentals, Array, String, IO & References
- Section 3 | Python: Introduction to Python, Tokens, Variables, Data Types, I/O, Operators & Expressions, Control Flow & Looping, Collections & Strings, Functions & Modules, File Handling & Data Analysis
- Section 3 | Digital Electronics: Digital Systems & Boolean Basics, Logic Gates & Hardware, Boolean Expression, Boolean Minimization, Combinational Circuit, Sequential Circuits, Number System, Number Representation
- Section 3 | Multimedia: Multimedia
- BPSC Previous Year Papers:
- BPSC Full Mock Tests:
AI summary & chapters
AI Summary
An AI-generated summary of this video lecture.
This lecture introduces threaded binary trees, a data structure that replaces NULL pointers with special links called threads to enable tree traversal without recursion or an auxiliary stack. The instructor defines the concept, distinguishes between single-threaded and double-threaded variants, and demonstrates how left and right pointers are repurposed to point to inorder predecessors or successors. A worked example uses a binary search tree with nodes 1, 2, 3, 5, and 7 (later expanded to a larger tree with values like 10, 8, 30, 4, 9, etc.) to show how NULL pointers are identified and replaced with thread links. The inorder traversal sequence 5, 8, 29, 4, 10, 9, 30, 41, 16, 52 is written on screen to illustrate predecessor and successor relationships. The instructor highlights specific nodes (e.g., 5, 4, 29, 8) and draws arrows to show how traversal proceeds from a node's right child or its inorder successor. The final segment demonstrates the complete inorder traversal of the threaded tree, showing how threads allow sequential access to all nodes without backtracking or stack operations.
Chapters
0:00 – 2:00 00:00-02:00
The lecture opens with the definition of a Threaded Binary Tree on screen: 'A Threaded Binary Tree is a binary tree in which NULL pointers are replaced with special links (threads) to make traversal easier.' The stated purpose is 'To perform tree traversal without using recursion or stack.' Two types are introduced: Single Threaded Binary Tree (with subtypes Left-Threaded, where the left NULL pointer points to the Inorder Predecessor, and Right-Threaded, described as 'Most Common,' where the right NULL pointer points to the Inorder Successor) and Double Threaded Binary Tree. The instructor begins drawing a node structure with fields labeled 'Left Child Add.', 'Data', and 'Right Child Add.'
2:00 – 5:00 02:00-05:00
The instructor draws a binary tree with nodes 1, 2, 3, 5, and 7, then expands individual nodes to show their internal three-field structure. Node 5 is expanded to display 'NULL, Data, 7000' and node 7 shows 'NULL, 7, null,' illustrating how NULL pointers appear in an unthreaded tree. A table format is used to show the left child address, data, and right child address for each node. The instructor then draws a more complete binary tree structure with colored boxes representing node fields and arrows indicating pointer directions, annotating nodes with inorder predecessor and successor threads to demonstrate the double-threaded variant.
5:00 – 10:00 05:00-10:00
A larger binary tree is displayed with three-field nodes annotated with specific values: the root shows '100 10 300,' its left child shows '400 8 500,' and the right child shows '600 30 700.' Leaf nodes display values like 'NULL 5 NULL' and '800 4 NULL.' At the bottom, an inorder traversal sequence is written: '5 8 29 4 10 9 30 41 16 52.' The instructor circles the leftmost node (value 5) and draws a horizontal line under it to indicate its NULL pointers. The words 'Predecessor' and 'Successor' are written with arrows pointing to the inorder sequence, establishing that threads will link each node to its adjacent nodes in this traversal order.
10:00 – 14:50 10:00-14:50
The instructor demonstrates the threading process by circling specific values in nodes and connecting them to their positions in the inorder sequence. The value 4 is circled with its null right child highlighted, and a line connects it to the inorder sequence. The value 29 is circled in both the tree and the traversal list, as are values 8 and 5. Green brackets are drawn under several nodes to indicate value ranges. In the final segment, arrows are drawn between nodes to represent successor pointers: an arrow from node 41 points to its successor 16, and an arrow from node 52 points to NULL. The inorder traversal sequence is updated step-by-step at the bottom, progressing through '5 8 29 4 10 9 30 41 16 52 NULL,' demonstrating how threads enable sequential traversal without recursion or a stack.
The lecture progresses from definition to demonstration. First, the core concept is established: NULL pointers in a binary tree are replaced with threads that point to inorder predecessors or successors, eliminating the need for recursion or a stack during traversal. Second, the two main variants are distinguished: single-threaded trees (left or right) and double-threaded trees, with the node structure shown as having three fields (left pointer, data, right pointer). Third, a concrete example is built incrementally: starting with a small tree (nodes 1-7), the instructor expands to show internal node structure, then moves to a larger tree with specific pointer values (e.g., '100 10 300' at the root). The inorder traversal sequence is written out to make predecessor-successor relationships explicit. Finally, the threading process is demonstrated by highlighting NULL pointers and drawing arrows to show how each node's thread links it to its inorder neighbor. The key pedagogical move is connecting the abstract definition (NULL replaced by thread) to a concrete visual example where students can trace the traversal path using only the threads, confirming that no stack or recursion is needed. The sequence 5-8-29-4-10-9-30-41-16-52 serves as the reference for all predecessor and successor links throughout the demonstration.