diff --git a/data/part-12/4-multidimensional-data.md b/data/part-12/4-multidimensional-data.md index 785bc3855..73a961c64 100644 --- a/data/part-12/4-multidimensional-data.md +++ b/data/part-12/4-multidimensional-data.md @@ -86,7 +86,8 @@ for (int row = 0; row < twoDimensionalArray.length; row++) { } ``` -Nyt tulostus näyttää seuraavalta: + +The program output is as follows: @@ -111,7 +112,7 @@ Create in the exercise base a method called `public static String arrayAsString( -Brush up on using StringBuilder in part nine before taking on this exercise. Below there are a few examples of how the method is expected to work. +Brush up on using StringBuilder in part 10.3 before taking on this exercise. Below there are a few examples of how the method is expected to work. When we search for a value of a key from a hash table, we use the hashCode method to find the index to search from. -There can be multiple values at the same index (on a list). Then we have to kompare the key we want to find the value for to the key of each key-value pair on the list using the equals method. -When we search for a a value of a key -- or index -- in an array, we do not have to do any of that. +There can be multiple values at the same index (on a list). Then we have to compare the key we want to find the value for to the key of each key-value pair on the list using the equals method. +When we search for a value of a key -- or index -- in an array, we do not have to do any of that. An array either contains a certain value or it does not, so there is a small performance beneft on using arrays. @@ -335,7 +336,7 @@ Hash tables have tested and proven functionality for increasing the size of the However, errors are accepted and natural part of software development. -When we consider the memory usage, hash table might -- in some situations -- have some benefits. +When we consider the memory usage, hash tables might -- in some situations -- have some benefits. When an array is created, enough memory for the whole array is allocated for it. If we do not have values in each element of the array, some of the memory stays unused. With hash tables this does not happen -- the size of the hash table is increased only when necessary.