"Hello, Amigo! You've gotten a little soft! Here are your exercises. If you run into difficulties, check with your colleagues. They'll definitely help."
6
Task
Java Core, level 10, lesson 10
Locked
Minimum changes
Minimum changes
12
Task
Java Core, level 10, lesson 10
Locked
Deserialization
Deserialization
20
Task
Java Core, level 10, lesson 10
Locked
Find the bugs
Find the bugs
6
Task
Java Core, level 10, lesson 10
Locked
Correct the mistake. Serialization
Correct the mistake. Serialization
6
Task
Java Core, level 10, lesson 10
Locked
Serializing people
Serializing people
6
Task
Java Core, level 10, lesson 10
Locked
Serialization is prohibited
Serialization is prohibited
20
Task
Java Core, level 10, lesson 10
Locked
Overriding serialization in a thread
Overriding serialization in a thread
12
Task
Java Core, level 10, lesson 10
Locked
Making the right conclusion
Making the right conclusion
12
Task
Java Core, level 10, lesson 10
Locked
Introducing graphs
Introducing graphs
"You did everything already? Well, here are some exercises that are even more difficult:"
Wow, what a task! I'm not sure if CodeGym accepts recommendations, but I think the course would benefit a lot if it included a lesson on possible ways of searching through 2D arrays (I've found 5 in open sources) and, by all means, a good solid lesson on DFS (Depth-First Search), which is actually necessary for this type of tasks. I'm glad there are free materials on this topic on the internet, but it wouldn't hurt to provide the reguired theory here as well.
tomtom6789Level 1, University Place, United States
5 October 2024
I'll be back to finish the last three exercises after I graduate from the course.😂
Rectangle Algorithms:
{ 1, 0, 0, 0}
{ 0, 1, 0, 0}
{ 0, 0, 1, 0}
{ 0, 0, 0, 1}
{ 1, 1, 0, 0}
{ 1, 0, 0, 0}
{ 0, 0, 1, 1}
{ 0, 0, 0, 1}
this arrays contains 4 rectangles. according to the instructions, I assumed that in such a case the number of rectangles should be 0.
tomtom6789Level 1, University Place, United States
About "Number algorithms" (task2025), here is a very unique idea:
the numbers in the task are called Armstrong numbers.
There are only 89 Armstrong numbers in the decimal number system.
All 89 are listed here:
https://hu.wikipedia.org/wiki/Armstrong-szám
or here:
https://mathworld.wolfram.com/NarcissisticNumber.html
- In a long[] array, put all of them that are less than Long.MAX_VALUE.
- Make a loop that returns from this array all elements as an array that are less than the number passed to the getNumbers() method.
- Exception: according to the links above, 0 is also an Armstrong number. But CG does not accept zero as an Armstrong number. So take zero out of the long[] array mentioned above.
This solution was not my idea, it is from another user.
The validator accepts it.
for those who do not only want to pass the tasks but also understand how Serialization and inheritance are related, I hope you find this article useful: https://www.geeksforgeeks.org/object-serialization-inheritance-java/
GO TO FULL VERSION