Tag

Tree Traversal

0 views collected around this technical thread.

Java Captain
Java Captain
Apr 23, 2025 · Fundamentals

Understanding Recursion in Java: Concepts, Pros/Cons, and Practical Examples

This article explains the fundamentals of recursion in Java, covering its definition, advantages and disadvantages, differences from iteration, and provides practical examples such as traversing comment and department trees, along with code snippets, performance considerations, and improvement strategies using depth control and Stream API.

Code ExampleJavaTree Traversal
0 likes · 7 min read
Understanding Recursion in Java: Concepts, Pros/Cons, and Practical Examples
php中文网 Courses
php中文网 Courses
Apr 9, 2025 · Fundamentals

Pre-order Traversal in PHP: Recursive, Iterative, and Interactive Implementations

This article explains the concept of pre-order (root-left-right) tree traversal, demonstrates how to represent binary trees in PHP, provides recursive and stack‑based iterative implementations, and includes an interactive script that lets users build a tree and choose traversal methods, with full example code.

Binary TreeInteractivePHP
0 likes · 9 min read
Pre-order Traversal in PHP: Recursive, Iterative, and Interactive Implementations
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Dec 18, 2023 · Fundamentals

Binary Tree in Java: Representation, Traversal, and Common Operations

This article introduces binary trees, explains their Java representation, demonstrates pre-order, in-order, post-order, and level-order traversals, and provides implementations for creating full binary trees, counting nodes, computing height, and counting leaf nodes, complete with sample code and usage examples.

Binary TreeJavaTree Traversal
0 likes · 10 min read
Binary Tree in Java: Representation, Traversal, and Common Operations
Wukong Talks Architecture
Wukong Talks Architecture
Mar 11, 2021 · Fundamentals

A Plain-Language Introduction to Binary Trees

This article uses the occasion of Tree‑Planting Day to explain binary trees in simple terms, covering their definition, node types, degree, levels, five tree shapes, traversal methods (pre‑order, in‑order, post‑order, level‑order), advantages, drawbacks, and a brief comparison with binary search.

Binary TreeTree Traversalalgorithm
0 likes · 9 min read
A Plain-Language Introduction to Binary Trees
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Apr 24, 2020 · Fundamentals

Comprehensive Introduction to Binary Trees in Java

This article provides a detailed overview of binary trees, covering their definition, traversal methods, various types such as full, complete, BST, and AVL trees, along with their characteristics, advantages, disadvantages, and time‑complexity considerations for Java developers.

AVLAlgorithmsBST
0 likes · 7 min read
Comprehensive Introduction to Binary Trees in Java
Selected Java Interview Questions
Selected Java Interview Questions
Feb 6, 2020 · Fundamentals

Binary Search Tree (BST) Overview, Implementation, and Traversal in C

This article introduces the concept of trees and binary search trees, defines a C struct for tree nodes, and provides complete implementations for creating nodes, inserting, deleting, searching, finding min/max, computing size and height, as well as recursive and non‑recursive traversals including pre‑order, in‑order, post‑order and level‑order.

Binary Search TreeC++Tree Traversal
0 likes · 13 min read
Binary Search Tree (BST) Overview, Implementation, and Traversal in C