Salesforce Interview Question

1) Given an array representing a BST ,write all permutations of array representing same bst. 2) Given 2d matrix of characters and a string print the every path containing that string