Each day I solve several challenges and puzzles from Codr's ranked mode. The goal is to reach genius rank, along the way I explain how I solve them. You do not need any programming background to get started, but you will learn a ton of new and interesting things as you go.
In this post I'll cover two challenges because the first one is a quick one:
The first challenge requires us to figure out R
's initial value (βοΈ). But because this value gets overwritten later in the code, so the initial value doesn't matter. But it must be a boolean to pass our validation criteria, so either true
or false
are correct.
Let's proceed to the next challenge:
This one is a bit more exciting. We need to figure out π and βοΈ, both identifiers, such that R=11
. To find π you need to analyze the for-loop, it contains a variable N
which hasn't been declared yet, so π is most likely going to be N
. The identifier for βοΈ doesn't matter much, because if you look at the last line of code R=arr.length
, the challenge is only interested in the number of items in the array, not what those values actually are. So βοΈ should ideally be N
or i
.
If you feel inspired and motivated to upgrade your coding + debugging skills, join me on the Road to Genius at https://nevolin.be/codr/
Top comments (0)