Pre-Revision Reflection
I got a 38/39 on my Collegeboard MCQ! I am ecstatic that I have been able to attain such a high score. However, I am still aware that I need practice, as I struggled with many and used VSCode and a blank class to check my work often. I’d say that I may have achieved a 30 out of 39 if I had no crutches. The questions that were simple were obviously easy, but the ones I actually had to try on and think a lot took me a while, a lot of thinking, and some searching up when I eventually gave up. When I was taking the test, I noticed a drop in my test taking tolerance. I noticed that I often would get up, be confused at easy questions because of fatigue, or felt like the code on the page just passed through my head. I think getting AP books in order to build my tolerance is a must throughout my journey. I also struggled on large code blocks with selections about what worked and what doesn’t work. I noticed that I also got confused by multiple loops, even though I wasn’t confused that much by recursion, which is great improvement from my last test.
The reason I’ve created a pre vs. post reflection is not to extend the amount of time that is read when this blog is read, however likely that may seem. I think it is important to see your mind set change in real time, and this prereflection on my work is important for capturing how I’ve thought before. Much like pushing branches to github, one must select the right code to resolve in merge conflicts to make you appear the best that you can be.
Incorrect Question
I’m going to pick the specific questions that I got incorrect, this only one being question 17.
What I selected: B. I honestly do not know why I got 17 wrong. I did some of this test late at night, so I have a feeling that I got it wrong because of that. I find that my thought process for this was probably that I looked at the loop and that it was incrementing and thought it was incrementing by one, defaulting to that rather than looking more in-depth and actually finding out what the code actually did. Looking back at it now, it is quite obvious that the loop is incrementing by 2, and is starting at one, thus the sequence would go “1, 3, 5, 7, … num” up until the loop’s local variable equalled or exceeded num.
**Correct answer: D**. The code returns the sum of all odd __integers__ between 1 and num inclusive.
17: Code in action
// MCQ Number 17
public class Main {
// Precondition: num > 0
public static int doWhat(int num){
int var = 0;
for (int loop = 1; loop <= num; loop = loop+2){
// Note the loop += 2, or increment by 2
// the loop also begins with one
// System.out.println(loop); // prints the number we are adding
var += loop;
}
return var;
}
public static void main(String[] args){
System.out.println("doWhat(3) --> " + doWhat(3));
System.out.println("doWhat(4) --> " + doWhat(4));
/*
* if this were to be the sum of all numbers, we would expect: 6 & 10
* We however get 4 and 4, which is the sum of all odd integers (1+3, for both)
*/
}
}
Main.main(null);
doWhat(3) --> 4
doWhat(4) --> 4
Questions I Struggled On
These questions were not necessarily chosen because of time spent, more so on the difficulty I had in grasping them. These mainly focused on longer, nested loops and operations with 2D arrays that I often had to code over actually solving in my head. These questions that I struggled on and wanted to highlight
Question 7
What I selected, and the correct answer: C The reason I think I struggled on this problem was because I wasn’t understanding some of the System.out.print()
syntax (like a bozo). But past that, I found it hard at first to think like the computer, and to really store both inner and outer as both were mutating. I feel like a big help on this problem would be a piece of paper, something I didn’t use at home nor had the luxury of having in class. So, instead I guessed which one I thought would be correct, and coded out the answer to check it in order to make sure. Sure enough, I was right, thinking that the staggering of the loops would result in the staggering as noted in the answer. The reason this answer is correct is because for every iteration of outer, there are 6 iterations of inner. However, for every two iterations, you lose one of the evens, thus the if(inner % 2)
executes one time less. Thus, it results in the staggered pattern one sees.
7: Code in Action
public class Main{
public static void main(String[] args){
for (int outer=1; outer<=6; outer++){
//System.out.println("outer");
for(int inner = outer; inner <= 6; inner++){
//System.out.println("inner");
if(inner % 2 == 0){
System.out.print(inner + " ");
}
}
System.out.println();
}
}
}
Main.main(null);
2 4 6
2 4 6
4 6
4 6
6
6
Question 20
What I selected, and the correct answer: E. This question asks what occurs when the code runs with a generic integer array. I feel like I struggled on this question mainly because of the large chunk of text, and when I was taking this, I had already gone through 20+ questions that I had to think in varying amounts of time for. I feel like this question is actually very easy to parse when looking at it a second time, the first array loops through that singular number, counting the amount of times it appears in the array. However at the time I had missed that part until later, hence why I struggled looking through it. The variable index
is stored as the index of the value, hence why it is the value that occurs most often. It doesn’t store the value, number of times, and the maximum value.
20: Code in action
public class Main{
public static int mystery(int[] arr){
int index = 0;
int count = 0;
int m = -1;
for (int outer = 0; outer < arr.length; outer++){
count = 0; // resets count to 0 for each loop
for (int inner = outer + 1; inner < arr.length; inner ++){
if(arr[outer] == arr[inner]) { // if we found the number
count ++;
}
}
if (count > m){
index = outer; // change index (number with the most amount)
m = count; // reset count
}
}
return index;
}
public static void main(String[] args){
int[] arr1 = {1,2,1,3,2,15,1,2,3,5,1}; // Returns 0 (1 is index 0)
int[] arr2 = {1,5,5,5,1,5,1,3,4,1,5,5,5,5,1,29,10,19}; // returns 1 (5 is index 1)
System.out.println(mystery(arr1));
System.out.println(mystery(arr2));
}
}
Main.main(null);
0
1
Analysis, Analysis, Analysis
I didn’t do the best on my previous collegeboard MC, having spend far to little time on the MCQ. Thus, I wanted to compare the average times and scores relative to each MCQ.
MCQ 2014
- Score: 38/40 (95%)
- Total Time: 13 minutes and 21 seconds
- Average time per question: 20.025 seconds(!)
Histogram (2014):
MCQ 2015
- Score: 38/39 (97%)
- Total Time: 2 hours, 3 minutes, and 43 seconds
- Average time per question: 3 Minutes and 5 seconds
Histogram (2015):
Comparison
Section | Difference |
---|---|
Score (%) | 2% |
Time | Over 2 hours |
Average time | Over 2 minutes |
Post work reflection: I noticed a couple of patterns with my work and now understand what i have to do to improve. I should have some scratchpad, to better work with loops and understand what they’re doing. I should also take these at earlier times to limit my concentration loss at night. I overall am impressed with my performance, however! I will look to improve next time.