Problem Binary Search Tree, with preorder traverse. What other methods should I add? How can I improve it? class Bst […]

# Tag: tree

## Composite and Visitor patterns for tree-based survey functionality in C#

Problem I have written some survey functionality for a project. Basically, a generic survey form that can be composed of […]

## LeetCode: Validate Binary Search Tree C#

Problem I was struggling with this question for many times, and I have solved it every time, because I understand […]

## Geektrust: Modelling Family Relationships in a OO way

Problem I’m trying to model family relationships in a OO way, i.e. As we update the relationships between two individuals […]

## Turning a 2D array into a tree

Problem I have the following data structure that’s obtained from a third party: var data = [ [“Parent1”, “Parent1.1”, “Parent1.1.1”], […]

## Manipulate a tree layer wise

Problem I built a tree in Haskell where every node has a number that is unique in its path from […]

## Binary search tree in Java with only one class

Problem I have written a BST using one class. Is my code okey or something could be better? /** * […]

## Saving and resuming position while iterating over a container

Problem Background: I’m in the process of writing a relatively simple behavior tree driven AI system for a game that […]

## Finding if the tree is balanced or not

Problem Can someone please review my code and let me know if there are some bugs or possible improvements? /** […]

## Recursive Preorder Traversal

Problem For today, I tackled this coding challenge question: Given a binary tree, write a method to recursively traverse the […]