Backtracking

Longest path in 2D array
AskAI

Given a 2D array of integers, find the length of the longest path of consecutive integers starting from the top left corner of the array. The path can move up, down, left, or right.

Find all words in a 2D array of characters
AskAI

This problem asks us to find all the words in a 2D array of characters. The input is a 2D array of characters, and the output is a list of strings containing all the words in the array.

Longest path of consecutive integers in a 2D array
AskAI

Given a 2D array of integers, find the length of the longest path of consecutive integers. The path can move up, down, left, or right, but cannot skip over any numbers .

All Possible Permutations
AskAI

Given a set of distinct integers, this algorithm will return all possible permutations of those integers. For example, if the input is [1,2,3], the algorithm will return [[ 1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]].

Distinct Subsets
AskAI

This problem asks you to generate all possible subsets of a given set of distinct integers. For example, if the input is [1,2,3], the output should list all possible subsets: [1], [1,2], [1,2,3], [1,3], [2], [2,3], and [3].

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

This problem asks you to generate all possible subsets from a set of distinct integers. For example, given the input [1,2,3], the output should be [[3],[1 ],[2],[1,2,3],[1,3],[2,3],[1,2],[]]

Restore IP Addresses from Digits
AskAI

Given a string of digits, this problem seeks to find all possible valid IP addresses that could be generated from it. IP addresses are typically represented in dot-decimal notation (e.g . "192.168.1.1"), so the goal is to find all possible ways to group the digits in the input string into sets of four that could each correspond to one section of an IP address.

Longest Path in a 2D Array
AskAI

This problem asks you to find the longest path of consecutive integers in a 2D array, starting from the top left corner. The path can move up, down, left, or right.