# About the official tutorials category

**URL:** <https://forums.kodeco.com/t/about-the-official-tutorials-category/19>\
**Category:** 🎓 Courses & Articles\
**Created:** [February 18, 2016, 7:42pm UTC](https://forums.kodeco.com/t/about-the-official-tutorials-category/19 "2016-02-18T19:42:31Z")\
**Posts on this page:** 1\
**Showing post:** 13

<div class="post-metadata">

**Author:** ![geekomancer](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/geekomancer/32/81494_2.png) [@geekomancer](https://forums.kodeco.com/u/geekomancer)\
**Post date:** [February 10, 2018, 3:11am UTC](https://forums.kodeco.com/t/about-the-official-tutorials-category/19/13 "2018-02-10T03:11:48Z")

</div>

Hi all, I wasn’t sure where else to post a question about a closed topic. I apologize if I’m posting in the wrong place, but I’m nerding out on this algorithm tutorial:

> [@Swift Algorithm Club: Swift Tree Data Structure](https://forums.kodeco.com/t/swift-algorithm-club-swift-tree-data-structure/17194):
>
> Learn how to implement a Swift Tree data structure through this hands-on tutorial! This is a companion discussion topic for the original entry at [https://www.raywenderlich.com/1053-swift-algorithm-club-swift-tree-data-structure](https://www.raywenderlich.com/1053-swift-algorithm-club-swift-tree-data-structure)

I am a beginner, obvs, and would like to access ‘depth’ in a tree. I.e. if root is depth 0, when I add children they should be depth 1, the next children would be depth 2, etc.

I know this should be super basic, but I’m having a little trouble wrapping my brain around it.

I tried something like: in the Node class initialize depth: Int, and then in the add(child:) function I could say depth +=. But then I would have to add it manually to each Node, which is unnecessary. Should I instead add a value to the array? Or…? 😕

aTdHvAaNnKcSe  
(THANKS in advance)

Side note. It seems odd to close forum topics — makes it much harder to continue or organize the discussion. **Feature request: keep tutorial discussions open? (all discussions?)**

---

_[View the full topic](https://forums.kodeco.com/t/about-the-official-tutorials-category/19)._
