Recursion

Get all possible subsets from a set of distinct integers.
AskAI

Given a set of distinct integers, this problem returns all possible subsets that can be formed from those integers. For example, if the input is [1,2,3], the output would be [[3], [1], [2], [1,2,3], [1,3], [2,3], [1,2], []].

Find the sum of all the odd numbers in an array.
AskAI

Given an array of integers, write a function that returns the sum of all the odd numbers in the array.

Determining If a Subset of Distinct Integers Sum to a Given Number
AskAI

This problem deals with finding a subset of distinct integers that sum to a given number. An example input and output are given.

"Is this binary tree balanced?"
AskAI

Given a binary tree, this function determines whether the tree is balanced. A balanced binary tree is one in which the left and right subtrees of each node have heights that differ by no more than 1. This example input results in an output of True.

Printing the power set of a given set of distinct integers.
AskAI

This program prints the power set of a given set of distinct integers. The power set of a set is the set of all its subsets.

Print the power set of a given set of distinct integers.
AskAI

Given a set of distinct integers, this program prints out the power set of the set. The power set of a set is the set of all its subsets.

Find the Maximum Path Sum in a Binary Tree
AskAI

Given a binary tree, this algorithm finds the maximum path sum. A path is defined as a sequence of nodes from some starting node to any node in the tree along the parent-child connections . The path must contain at least one node and does not need to go through the root.

Find the Maximum Path Sum in a Binary Tree
AskAI

This problem asks you to find the maximum path sum in a binary tree. A path is defined as any sequence of nodes from some starting node to any node in the tree along the parent- child connections. The path must contain at least one node and does not need to go through the root.