QUESTION Given a 2D board and a word, find if the word exists in the grid. The word can be constructed from letters of sequentially adjacent cell, where “adjacent” cells are those horizontally or vertically neighboring. The same letter cell may not be used more than once. This question is provided by Leetocode.
QUESTION The set [1,2,3,…,n] contains a total of n! unique permutations. By listing and labeling all of the permutations in order, We get the following sequence (ie, for n = 3): “123” “132” “213” “231” “312” “321” Given n and k, return the kth permutation sequence. Note: Given n will be between 1 and 9 Read the full article…
QUESTION Given a digit string, return all possible letter combinations that the number could represent. A mapping of digit to letters just like on the telephone buttons. Note: Although the above answer is in lexicographical order, your answer could be in any order you want. This question is provided by LeetCode.
QUESTION Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses. For example, given n = 3, a solution set is: “((()))”, “(()())”, “(())()”, “()(())”, “()()()” This question is provided by LeetCode.