Tries: Contacts

  • + 0 comments

    Try walking through the add() function, with a word, such as Ben.

    1. We create B as a child, go to it, and increment it's size
    2. We create e as a child, go to it, and increment it's size
    3. We create n as a child, go to it, and increment it's size

    Now each letter has proper size.

    HackerRank solutions.