Amazon interview question

1. construct tree from given inorder and preorder traversal 2. Rod cutting Dynamic programming problem.