Week 4
In this week I try to increase the difficulty to 1200 from 900 to see what I could do. When looking at the problem the wording had me a bit confused but after a little more time I got the grasp of what they were asking. First, we take an input t, which represents how many test cases there will be. I put the number of t in a while loop so that it will run through all the test cases. A new code I learned was "while(t-->0)" this means while t is greater than zero decrement so instead of "while (t>0) and then doing t--" I do (t-->). Second, we take the number of n sticks that there will be, which I put into a for loop to go till it reaches all the sticks and create space for a set name sticks. To get to this part took me while, after trying to figure out on my own I went to YouTube to figure out how I could hold these data points and figure out what height combinations I need. That where I found that we used a data structure called a set or hashset. From the l...