Question: 40 Combinations - 40 pts Using the numbers 1, 3, 9, and 27 and only the + and - operators, you can output any integer

 40 Combinations - 40 pts Using the numbers 1, 3, 9,

40 Combinations - 40 pts Using the numbers 1, 3, 9, and 27 and only the + and - operators, you can output any integer number between 1 and 40 Write an efficient function findCombinationsOf(n) that returns a string contaning the numbers and operations leading to n, where any of the numbers above can be used at most once. Examples: findCombinations of (10) returns "9 + 1" findCombinationsOf(32) returns "27 +9.3 - 1" find combinationsOf(40) returns "1 + 3 + 9 + 27

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!