News: 0178550150

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

The Toughest Programming Question for High School Students on This Year's CS Exam: Arrays

(Monday August 04, 2025 @03:54AM (EditorDavid) from the are-you-smarter-than-a-12th-grader dept.)


America's nonprofit [1]College Board lets high school students take college-level classes — including a computer programming course that culminates with [2]a 90-minute test . But students did better on questions about If-Then statements than they did on questions about arrays, according to the head of the program. Long-time Slashdot reader [3]theodp explains:

> Students exhibited "strong performance on primitive types, Boolean expressions, and If statements; 44% of students earned 7-8 of these 8 points," says program head Trevor Packard. But students were challenged by "questions on Arrays, ArrayLists, and 2D Arrays; 17% of students earned 11-12 of these 12 points."

>

> "The most challenging AP Computer Science A free-response question was [4]#4, the 2D array number puzzle ; 19% of students earned 8-9 of the 9 points possible."

You can [5]see that question here . ("You will write the constructor and one method of the SumOrSameGame class... Array elements are initialized with random integers between 1 and 9, inclusive, each with an equal chance of being assigned to each element of puzzle...") Although to be fair, it was the last question on the test — appearing on page 16 — so maybe some students just didn't get to it.

[6]theodp shares a sample [7]Java solution and one in [8]Excel VBA solution (which includes a visual presentation).

There's tests in 38 subjects — but CS and Statistics are the subjects where the highest number of students [9]earned the test's lowest-possible score (1 out of 5). That end of the graph also includes notoriously difficult subjects like Latin, Japanese Language, and Physics.

There's also a [10]table showing scores for the last 23 years , with fewer than 67% of students achieving a passing grade (3+) for the first 11 years. But in 2013 and 2017, more than 67% of students achieved that passsing grade, and the percentage has stayed above that line ever since (except for 2021), vascillating between 67% and 70.4%.

2018: 67.8%

2019: 69.6%

2020: 70.4%

2021: 65.1%

2022: 67.6%

2023: 68.0%

2024: 67.2%

2025: 67.0%



[1] https://en.wikipedia.org/wiki/College_Board

[2] https://apcentral.collegeboard.org/media/pdf/ap25-frq-computer-science-a.pdf

[3] https://www.slashdot.org/~theodp

[4] https://apcentral.collegeboard.org/media/pdf/ap25-frq-computer-science-a.pdf#page=16

[5] https://apcentral.collegeboard.org/media/pdf/ap25-frq-computer-science-a.pdf#page=16

[6] https://www.slashdot.org/~theodp

[7] https://www.apluscompsci.com/Tips_On_The_AP_FR_25.pdf#page=44

[8] https://live.staticflickr.com/65535/54694475507_334479d81f_b.jpg

[9] https://live.staticflickr.com/65535/54695513398_de31dc1781_b.jpg

[10] https://apstudents.collegeboard.org/about-ap-scores/score-distributions/ap-computer-science-a



Java (Score:1)

by innocent_white_lamb ( 151825 )

Interesting that they have the kids write the answers for this exam using Java.

I can see a plus side ("universal" implementation) and a really big negative (Oracle).

I was in school pre-computer age so there was no such thing at that time, but didn't the kids learn Pascal in school some years back?

I suppose any language will do, more-or-less, since they'll all show you functions and function calls, arrays, variable types and data handling.

Re: (Score:2)

by greytree ( 7124971 )

I don't want my kids dabbling in no multiple inheritance, like their 6-fingered cousins did.

Re: (Score:2)

by Brain-Fu ( 1274756 )

It's too hard. As such, it scares too many students away. The schools want that student loan money, so they don't want to scare students away, so they water things down as much as possible.

I suspect that all the hype around AI replacing programmers is scaring students away too, so making the ones who are interested prove themselves with C/C++ would be devastating to enrollment.

Re: (Score:3)

by HiThere ( 15173 )

C is actually easier than Java, though doing anything complex is harder.

A C++ subset doesn't have to be any harder than Java, and can be at least as capable. (The problem would be documenting it...and for students, learning to use only the subset.)

Re: (Score:3)

by ls671 ( 1122017 )

> I can see a plus side ("universal" implementation) and a really big negative (Oracle).

Nowadays you don't need anything Oracle to build and deploy in Java so you can take that one off your list.

Eventually need a language with pointers (Score:2)

by drnb ( 2434720 )

> I suppose any language will do, more-or-less, since they'll all show you functions and function calls, arrays, variable types and data handling.

Technically, a language that supports pointers is very helpful. You can get by without pointers for a little while, even data structures with a little hand waving. But in the computer architecture class understanding memory, variable, arrays, etc pretty much requires a couple of aha moments where a language with pointers can be useful. Details covered in a different post.

Note, this does not mean you have to use a language with pointers going forward. Just that getting past the aha moments could really us

Re: (Score:2)

by HiThere ( 15173 )

Pointers aren't required for most purposes. They're often just an optimization, frequently a questionable optimization. It's true that C pretty much requires pointers, but in C++ references can generally be substituted with greater clarity. Pointers are almost never used in Java (are they ever?), and certainly not in Python. Or many other languages I could name. (Yeah, they still exist "under the hood", but that's not the point of an exam of early or intermediate programming skill.) For that matter c

Re: (Score:2)

by godrik ( 1287354 )

The exam and curriculum were redesigned in 2004 and haven't changed much since In 2004 it made sense to do java.

In the past they have used other languages in the past. According to wikipedia: pascal from 84 to 99, c++ from 99 to 04 and java since.

Re: (Score:2)

by registrations_suck ( 1075251 )

I went to high school 1984-1989 and took 3 years of programming classes.

Year 1: basic

Year 2: pascal and z-80 assembly

Year 3: pascal

Re: (Score:2)

by NaCh0 ( 6124 )

Interesting that they have the kids write the answers for this exam using Java.

They have to pick something. You can't switch it every year or public school teachers won't keep up.

It is fairly trivial to jump from Java to C++, PHP, C#, Dart or any number of C-like languages.

Worst case, you flip the variable name before the type as the function parameter and you've instantly opened another few dozen common languages. (Kotlin, Golang, Swift, Rust, etc)

Java is a fine language to teach if statements, for loops a

Ambiguity? (Score:2)

by Petersko ( 564140 )

On the surface that hardest question (matrices, question 4) doesn't seem particularly hard. However... I do spot places where the desired result seems uncertain. Do you exit the analysis as soon as the puzzle is shown to not be solved, or do you process all the cells regardless? A small point... but there has to be a reason why less than 1/5 got full marks.

Re: (Score:2)

by sizzzzlerz ( 714878 )

The way I read it, they didn't need to write the code to solve the actual game, they just needed to write a constructor and a method that, given one cell and it's value, search the array from the row specified to the end for a second value that either is equal to the first or sums to 10 with the first. That ought to have been easy for anyone who was paying attention in class and was actually doing the assignments instead of submitting chatgpt's responses to their homework.

Re: (Score:3)

by tlhIngan ( 30335 )

Yeah, it's basically that simple.

The first question is to write the constructor - basically allocate the array in memory and set its contents to a random value between 1 and 9.

The second question just asks if given a number, find one that matches in the game - either the same value or its complement that adds it 10. If there are multiple possible matches, you pick one arbitrarily.

The examples shown go through it fairly well so if you read it carefully and process what is happening, it's not a hard problem a

Re: (Score:2)

by narcc ( 412956 )

> a fairly basic and trivial problem that should've been covered in the first week of any CS class.

Nonsense. Multidimensional arrays are not a week 1 topic. Not even in AP CS, which doesn't cover anything other than programming.

I'm periodically asked to teach the AP CS class at a local private school. Most students have no programming experience at all. A few have done hour of code, but their no better off for it. The first two weeks are all computational thinking. You can't just throw aggregate structures and nested loops at them and expect anything other than confusion and frustration.

If those

Re: (Score:2)

by arglebargle_xiv ( 2212710 )

That was my reaction too. If they'd said "here is a problem, solve it" then it would have been relatively easy. Instead they threw in a huge pile of constraints dictated by how the person who wrote the question would have solved it, which makes it a lot tougher to figure out. The first paragraph should have been the entire question, not the following four pages.

English (Score:3)

by markdavis ( 642305 )

> "There's tests in 38 subjects"

But apparently not including English. Next up, English primary school exam!

"There's tests" = "There is tests". "Is" is singular, not plural.

Correct answer is "There are tests" or "There're tests."

Re: (Score:3)

by markdavis ( 642305 )

> "There're is annoying to pronounce, so "there's" is often used in spoken language.

And yet "there are" is not annoying to pronounce and easy to write. So using the correct words isn't difficult.

> "That usage is moving into written language."

And spoken, as well. But that doesn't make it correct. It just looks/sounds completely uneducated and jarring.

"There", "their", and "they're" are confusing to many (for some odd reason). Just because we see them used incorrectly frequently doesn't legitimize usi

Re: (Score:2)

by Brain-Fu ( 1274756 )

> Just because we see them used incorrectly frequently doesn't legitimize using the wrong words.

Actually, it does. English does not have a regulatory body. It is an evolving language. So, popular use is precisely what determines meaning and correctness.

This is extremely frustrating, and hard to accept, for certain kinds of people. But it remains a staunch reality.

Re: (Score:2)

by markdavis ( 642305 )

> "Actually, it does.[...] So, popular use is precisely what determines meaning and correctness."

Well, tell that to your English teacher and see if it manages to get you a passing grade when you say/write very popular things such as: "I is going to the store", "They had went there", "You and me should get together", "I seen them do it", "Where did you put it at."

> "This is extremely frustrating, and hard to accept, for certain kinds of people"

I guess I am one of those people :)

Re: (Score:2)

by bjoast ( 1310293 )

The lack of an unambiguous English language authority does not prohibit engaging in discussions concerning what should and should not be considered proper English. Yours is just the typical cowardly stance of completely withdrawing from the discussion, watching it from the sideline while giggling, and then congratulating yourself on being superior.

Re: (Score:2)

by jbengt ( 874751 )

> . . . it remains a staunch reality.

It might be a reality, but I don't think "staunch" is the right term for it.

Re: (Score:2)

by RazorSharp ( 1418697 )

> Actually, it does. English does not have a regulatory body. It is an evolving language. So, popular use is precisely what determines meaning and correctness.

This is actually true of languages like French that have regulatory bodies, also. The regulatory bodies are the ones that are wrong when they contradict usage.

The regulatory bodies may be able to shape usage in certain contexts (especially legal documents, legislation, and the like), but in this respect they are no different than any other style guide.

Usage dictates correctness.

Re: (Score:2)

by backslashdot ( 95548 )

"There're" ??

Your grammar Nazi license has hereby been revoked.

Re: (Score:2)

by markdavis ( 642305 )

> " "There're" ??

That is a valid contraction. But it is strange. Much easier to just say/write "there are."

> "Your grammar Nazi license has hereby been revoked."

I actually thought it was a funny/witty posting, seeing the construct and subject (exams, education, AP, subjects). Sorry you think it is "grammar Nazi-ism", it wasn't meant to be that way. I do have better things to do than go after incorrect grammar- that would be a futile, full-time job.

Re: (Score:2)

by dsgrntlxmply ( 610492 )

Make allowances: he might be speaking Texan.

Re: (Score:2)

by zurtle ( 785688 )

Then there was the word "vascillating" at the end. An odd combination of vacillating and oscillating, I guess.

Re: (Score:2)

by ceoyoyo ( 59147 )

It's vacillating but lubricated with vaseline.

Re: (Score:3)

by serviscope_minor ( 664417 )

English is not a prescriptivist language. This is a common enough form, so it's fine.

No surprise here ... (Score:3)

by drnb ( 2434720 )

And to professors who have taught computer architecture, and to a lesser degree data structures, there is no surprise here.

There are two big relevant aha moments here. And surprisingly one can possibly get through data structures without them.

The first is that memory is just a series of addressable words, that can hold an unsigned integer in the range 0-N. N subject to the bit size of the word. And that these unsigned integers can be INTERPRETED as signed integers, floating point values, colors, a CPU instruction, etc. In special cases the hardware interprets these values, the CPU fetching instructions from memory, the video hardware fetching pixels for the screen. More often its just computer software interpreting its various variables of different types that are defined to be at a certain address.

The second moment is that we can add further abstraction by taking a contiguous number of these locations to interpret as an array. These locations are the data of the array, interpreted as whatever type is appropriate. Plus two supplemental locations are needed. The first recording the starting address of the array, the second the size, or number of elements, in the array.

A certain amount of hand waving can get one through data structures, but computer architecture is where one will have to face the above.

A friend that teaches the above says that multidimensional arrays are not as big a deal as the above two. That mapping multidimensional coordinates to a simple array is a pretty straight forward function. Students tend to get that given the math prerequisites. That if someone is having a problem with two dimension arrays check for the second aha moment above. They might not have fully gotten there.

Only last 23 years? (Score:2)

by davebarnes ( 158106 )

What about results from 1966 ?

chemistry

Calculus

Physics

good. (Score:2)

by snowshovelboy ( 242280 )

You should basically never use a generic ArrayLists or multidimensional arrays anyway. The test authors should feel ashamed to even ask somebody to allocate an ArrayList and return it from a function.

Re: (Score:2)

by znrt ( 2424692 )

there is nothing wrong with any of that in java .

(returning a generic arraylist instead of a specialized type would probably be frowned at, but the exercise was quite clear about that ... besides i find people look specially funny when they frown for nonsense!).

Obsolete (Score:3)

by ScooterBill ( 599835 )

How long until people quit learning programming languages?

I started using AI coding assistants last year. Because of this, I haven't had to write any actual code since then but I've made huge progress with my projects.

The beauty of AI coding is you leave room in your brain for conceptual ideas instead of volumes of syntax.

I think these tests will need to change to find the students who can compete while using AI assistants.

Re: (Score:1)

by Anonymous Coward

what a load of bullshit. I use various AI's daily to help with my coding. If you have found some magically AI that can accurately do 100% of your code either your code is so laughably basic as to not matter or you are simply incompetent. AI is great, but no way in hell can it currently do everything or even the majority of coding for a developer yet.

Re: (Score:3)

by gweihir ( 88907 )

> How long until people quit learning programming languages?

Never. There is tons of advanced stuff where you need that knowledge and were AI cannot do anything because insight is required. If you just do simple coding with CPU and memory overkill and no security requirements, sure, "AI" may do most of it. But that is not the situation in most important projects.

Helping students figure out what they're good at (Score:3)

by Tony Isaac ( 1301187 )

A lot of students who might try such CS classes take it on a whim, or because they've heard the pay is good for programmers, or just to try it out. Many of them will find out that working with computers is not what they're good at. And if that's the result, it's a good thing, they will be steered towards something else that they are better at.

Art is no different. I took art and music classes in school. I learned the theory, but also that I was terrible at art. So I went into programming, which turned out to be my strength.

There's nothing wrong with taking classes to learn that a subject is not for you.

Odd assumption in first question (Score:2)

by Preston Pfarner ( 14687 )

Describing a dog-walking company, we have:

"Returns the number of dogs, always greater than 0, that are available for a walk during the time specified by hour"

"always greater than 0"? As this means that every compliant dog-walking company must never run out of dogs to walk, how could one start a dog-walking company? To even exist, it must already have registered dogs — available to be walked at any hour of day or night — or it cannot be instantiated in a valid manner.

Is there an unspecified

Re: (Score:2)

by gweihir ( 88907 )

Yep, the spec is broken right there. There are already two major cases where this will not be true: (a) no dog at that time and (b) no dog at all, because no customers. Obviously this task was defined by an incompetent that does not understand border cases.

Incidentally, I had some exams in my CS studies where I had to fix the questions because they were broken. Always got the points from the TAs doing the grading in the review, although in one case I had to suggest I could explain why the question was broke

"No, you can't use SQL!" (Score:1)

by Tablizer ( 95088 )

fooey

I'm the only person I know that's lost a quarter of a billion dollars in one
year.... It's very character-building
-- Steve Jobs (1955-2011)