- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
k-ary tree in Data Structure
In this section we will see what is the K-ary tree. The K-ary tree is a rooted tree, where each node can hold at most k number of children.
If the value of k is 2, then this is known as binary tree. The binary tree, or ternary trees are some specialized k-ary trees. So k-ary trees re generalized.
Example of K-ary Tree −
In the above example, there is a root. The root has four children. Each child of root has some children also. The first child has three children, the second child has no child, the third one has two children, and the last child has four children.
Advertisements