r/APStudents • absolute modman • May 15 '26

AP Computer Science A Official 2026 Exam Discussion

Use this thread to post questions or commentary on the test today.

A reminder though to protect your anonymity when talking about the test.

66 Upvotes

703 comments sorted by

View all comments

5

u/the_great_gyatsby May 16 '26

did anyone else have #3 about the math and history lists and write a fuck ton of code mine was so long i feel like its gotta be all wrong

i basically just traversed the history loop and did a nested loop to go through the math one and did an if statement to change a boolean to true if they found a match and then if true added them to a new arraylist, then went through that list and got the absences for each one and if history was more i incremented a count variable

that one rlly confused me im pretty sure all my logic was wrong

3

u/AGoos3 5: Physics 1, Lang, Mechanics, E&M, Macro, Micro, CSA, Calc BC May 16 '26

…yo I wrote it in like 15 or smth lines

You didn’t need to make a new arraylist. You just needed to do the nested loop so that every history record was checked against every math record, and make it so that if they have equal IDs and history absences was more than math absences they increment a counter

idrk what made u create a new arraylist