A gradebook reads four students and writes a JSON report. The class average says 52.42, because two empty fields became zeros.
Article archive
Browse every article on Invasikode — programming tutorials, AI exploration, and software architecture guides.
A linked list is a linear chain of nodes, each holding data and a pointer to the next node. Here is what that chain looks like, what it costs next to an array, and the same minimal implementation in Java, Python, and JavaScript.
A gradebook reads three students from a file, prints three rows, and every score is 0. The procedure filled a copy of the array, because the parameter was missing var. Add the word and the report matches the file; the compiler had already warned about the call that filled nothing.
A notes script saves a line, prints it back, then counts zero. The file on disk is correct: read() left the pointer at the end, so the second call returned an empty string. Read once into a variable, or seek(0), and the count matches the file.
An algorithm is an ordered list of steps, and that order decides how expensive a problem is. The examples are on the back of an instant noodle packet, in a factorial, and behind ctrl+z.
A run with no prices ends at a hex address and status 217. -gl names the line, gdb names the values, and the mean of six positive prices comes out negative because integer is 2 bytes.