Recursion

String permutations using recursion.
AskAI

This technical problem deals with how to print all possible permutations of a given string using recursion. For example, if the input string is "abc", the output would be all six possible permutations of the string: "abc", "acb", "bac", "bca", "cab", and "cba".

Checking if a Binary Tree is a Mirror Image of Itself
AskAI

Given a binary tree, this function checks whether it is symmetrical around its center. For example, the first tree in the input is symmetrical, but the second one is not.

"Sum all elements in an array"
AskAI

This technical problem involves finding the sum of all elements in an array. The input is an array of integers, and the output is the sum of all elements in the array.

Maximum Depth of Binary Tree
AskAI

To find the maximum depth of a binary tree, we can use recursion. First, we need to check if the tree is empty. If not, we need to find the maximum depth of the left and right subtrees. The maximum depth of the tree is the maximum of the left and right subtrees' depths, plus one.

Sum of integers in a list (recursive).
AskAI

This technical problem deals with finding the sum of all integers in a list using recursion. An example input is given, along with the expected output.

Greatest Common Divisor
AskAI

The greatest common divisor of two positive integers can be found by recursively dividing the larger number by the smaller number until the remainder is 0.

Return all possible subsets of a given set of distinct integers.
AskAI

This technical problem deals with returning all possible subsets of a given set of distinct integers. For example, if the input is [1,2,3], the output should be all possible subsets of those integers, which are [], [1], [2], [3], [1,2], [1,3], [2,3], and [1,2, 3].

Reversing a Singly Linked List in Place
AskAI

This problem asks you to write a function to reverse a singly linked list in place. The input is a singly linked list, and the output should be the same list, but reversed .