Recursion

Find the maximum path sum from root to leaf in a binary tree.
AskAI

This problem asks you to find the maximum path sum from the root to a leaf in a binary tree. An example input and output are given.

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

Print the power set of a set of distinct integers. The power set of a set is the set of all its subsets.

Print numbers from 1 to n in ascending order
AskAI

This problem is about printing all numbers from 1 to n in ascending order. The function takes in a number n and prints out all numbers from 1 to n.

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

This problem deals with printing the power set of a given set of distinct integers. The power set is the set of all subsets of a given set, including the empty set and the original set itself. In this case, the input is {1, 2, 3} and the output should be {{}, {1}, {2}, {3}, {1, 2}, {1 , 3}, {2, 3}, {1, 2, 3}}.

Sum of all elements in an array
AskAI

This problem asks the programmer to find the sum of all elements in an array. An example input is given, along with the expected output.

"Longest Substring Without Repeating Characters"
AskAI

Given a string, the goal is to find the length of the longest substring without repeating characters. For example, given the string "abcabcbb", the longest substring would be " abc", with a length of 3.

Longest Palindromic Substring
AskAI

Write a function that returns the longest palindromic substring of a given string. For example, given the input "babad", the function would return "bab".

Array sum with recursion
AskAI

The problem is to find the sum of all elements in an array using recursion.