Complete the code to declare a simple array of integers.
int[] numbers = new int[1]5;
In C#, arrays are declared using square brackets []. So to create an array of size 5, we use new int[5].
Complete the code to add a new node to the end of a singly linked list.
currentNode.[1] = newNode;In a singly linked list, each node points to the next node using the Next property.
Fix the error in the tree node class to correctly define the list of children nodes.
public List<TreeNode> [1] = new List<TreeNode>();The list of child nodes in a tree is commonly named children to represent multiple nodes.
Fill both blanks to create a method that returns the number of children a tree node has.
public int GetChildCount() {
return [1].[2];
}The children list has a property Count that returns how many child nodes it contains.
Fill all three blanks to create a method that adds a new child node to a tree node.
public void AddChild(TreeNode [1]) { [2].[3]([1]); }
The method takes a parameter named child, then calls Add on the children list to add the new node.
