Discuss the process of solving the Coding Bat challenges. A major part of software design is thinking about how to approach a problem with the tools we have at our disposal. What were the steps you took to solve some of these challenges?
As I was busy self-teaching myself Python, it's been about 5 months or so since I touched JAVA. This became evident since I threw myself right at the Coding Bat challenges. Syntax wise, the struggle only lasted about 20 to 30 minutes or so before I started remembering all the JAVA basics.
Once I remembered the fundamentals, the coding challenges weren't much of a challenge. Most questions only took 1 or 2 tries/attempts. I was already accustomed to LeetCode styled questions (due to warnings given to me by every software engineer that I should familiarize myself with this). The only category that gave me some problems was the "String-2" module. I tried to stick true to the "intention" of the module's lesson and only use methods that were previously mentioned/taught by Coding Bat (e.g. charAt(), substring(), length(), and equals()). I made a conscious decision not to use AI to guide or help me. The tools that I limited myself to use was browsing through the StackOverflow forum website (which surprisingly felt useless most of the time. Most answers just seemed to be filled with SWE holding much disdain for each other - why is that?).
Due to this, it took me a bit of time to figure out certain nuances such as realizing I must use '' instead of "" when using the chatAt() method or that == cannot be applied to objects but .equal() method can (but that == can indeed be applied to Strings [which are technically objects] but with the understanding that it is pointing to the reference only rather than the characters being the same).
After I solved the questions, I took a look at YouTube tutorials to see how others did it. It made me realize how much I liberally used a "flagging" structure when a simple well placed && operand could have simplified it.
At the end of the day, this was a great warmup and exercise. After all, what is a better way to force memory retention than through frustration and being stuck? Ha.
No comments:
Post a Comment