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".
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.
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.
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.
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.
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.
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].
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 .