
You are given an array of variable pairs equations and an array of real numbers values , where equations[i] = [A _i , B _i ] and values[i] represent the equation A _i / B _i = values[i] . Each A _i or B _i is a string that represents a single variable.
You are also given some queries , where queries[j] = [C _j , D _j ] represents the j ^th query where you must find the answer for C _j / D _j = ? .
Return the answers to all queries . If a single answer cannot be determined, return -1.0 .
Note: The input is always valid. You may assume that evaluating the queries will not result in division by zero and that there is no contradiction.
Note: The variables that do not occur in the list of equations are undefined, so the answer cannot be determined for them.
1 <= equations.length <= 20equations[i].length == 21 <= A _i .length, B _i .length <= 5values.length == equations.length0.0 < values[i] <= 20.01 <= queries.length <= 20queries[i].length == 21 <= C _j .length, D _j .length <= 5A _i , B _i , C _j , D _j consist of lower case English letters and digits.