Given an array of integers nums and an integer target, return all pairs of numbers where one of the four arithmetic operations (+, -, *, /) produces exactly the target value.
For each valid pair (a, b) where a op b = target, return the expression as a string in the format "a{op}b" (e.g., "2+4", "3*2").
This problem tests your ability to enumerate all valid combinations while handling edge cases like division by zero, order-dependent operations, and duplicate values.
` nums = [2, 4, 6, 3] target = 6
result = findPairs(nums, target)
`
Consider all four operations: addition (+), subtraction (-), multiplication (*), division (/)
Order matters: "2+4" and "4+2" are different pairs
For division, only include pairs where:
Division is exact (no remainder)
If the same value appears multiple times, each occurrence is treated as distinct
Return each unique expression string only once, even if multiple index pairs produce it
Should we handle floating-point division or only integer division?
What if the target is 0? Can we have 0 in the array?
Should we validate that nums has at least 2 elements?
Are there performance requirements for large arrays?