the street and houses was not tough to code but tough to breakdown the task requirements, make sure to read each requirements and if it helps you try to write the conditions step by step.
one thing I found very helpful is the debug tool in IntelliJ IDEA, it showed me the array index out of bound error clearly and I knew how to solve it, the result is passing verification once.
FYI, my solution to "2 arrays" works as expected and produced the identical output to the "correct solution," but for some reason it would fail the verification process. Jsyk.
Yeah, the hard task is not really that hard, but you have to read carefully third point, I failed 4 times verification only because misread what I needed to count 🧐
GO TO FULL VERSION