+ 20
CHALLENGE: Find all the possibilities for using the numbers in a given order to get 100 1⃣▪️▪️▪️9⃣ ➡ ️ 1⃣0⃣0⃣
Level: medium Task1: Find all possibilities to put + or - or nothing between the numbers 1,2,…,9 (in this order) such that the result is 100. For example: 1 + 2 + 3 - 4 + 5 + 6 + 78 + 9 = 100 Task2: Find all possibilities to put + or - or nothing between the numbers 9,8,…,1 (in this order) such that the result is 100. For example: 9 + 8 + 76 + 5 + 4 - 3 + 2 - 1 = 100 All languages are welcome! https://code.sololearn.com/ccXCd5YjTxzG/?ref=app
4 Respuestas
+ 6
lazy
+ 3
Sorry it took so long. I was in the midst of too many things and forgot I wanted to do this.
https://code.sololearn.com/cBm5LSxMbfmu/?ref=app
+ 1
Got 11 forward answers and 15 reverse answers using recursion and backtracking.
https://code.sololearn.com/c0ZPo3u6l6VP/#java