# Search Results

Results tagged with Search options answers only user 27
5 results

For questions regarding the data storage structure of an Array. This can range from their standard indexing to their usage in comparison to other data structures. Arrays are an ordered list of elements which are usually all of the same type. Nested arrays can contain arrays as elements.

When I've explained this to beginning students, I don't stray far from your third reason, though I agree that the beginning of arrays is early to introduce the concept of memory addresses. Among … to use arrays correctly. But if you want a hint about why we actually do this, you can think about zero-based indexing as the distance from the head of the array. So, if I'm at the head of the …
answered Sep 3 '18 by Ben I.
You can get at this concept very intuitively in strings before you ever get to arrays. Take a string like "hello world" and ask them a subtle-sounding point: does the string begin here: "*hello … DISTANCE from the start. So, if we want the first character, we move no distance. And how far do we move to get the 3rd character? ..." When you later get to arrays, you can remind them of the concept, and just say that it is being used again here. …
answered May 27 '17 by Ben I.
A variant on the ENIGMA machine encryption works well in a single loop, and is sufficiently complex to give students a real challenge. The core idea of the ENIGMA machine for this assignment is that …
answered Dec 15 '17 by Ben I.
One small, but significant, algorithm is to find Euler's Number. The irrational number $e$, also called Euler’s number, is approximately 2.71828. The number is significant both to the culture of com …
answered Dec 15 '17 by Ben I.
Hmm, here are a few ideas: Calculating student GPA where the grades are all stored in an array of arrays, and the different semesters have different numbers of courses. Make a lookup table of prime … factors. Consider an array of arrays of paths to hike, and local maximum / local minimum elevations passed along the way. Since there will be a different number of local maxima/minima along the way …
answered Jan 10 by Ben I.