Skip to content

Commit 6f674ff

Browse files
authored
Merge pull request rage#206 from BenAttenborough/12.4-typos
12.4 typos
2 parents f40716b + 702656a commit 6f674ff

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

data/part-12/4-multidimensional-data.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,8 @@ for (int row = 0; row < twoDimensionalArray.length; row++) {
8686
}
8787
```
8888

89-
Nyt tulostus näyttää seuraavalta:
89+
<!-- Nyt tulostus näyttää seuraavalta: -->
90+
The program output is as follows:
9091

9192
<sample-output>
9293

@@ -111,7 +112,7 @@ Create in the exercise base a method called `public static String arrayAsString(
111112

112113
<!-- Kertaa yhdeksännestä osasta StringBuilderin käyttö ennen tehtävän tekoa. Alla muutamia esimerkkejä metodin odotetusta toiminnasta. -->
113114

114-
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.
115+
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.
115116

116117
<!-- ```java
117118
int rows = 2;
@@ -125,7 +126,7 @@ System.out.println(taulukkoMerkkijonona(matriisi));
125126

126127
```java
127128
int rows = 2;
128-
int cols = 3;
129+
int columns = 3;
129130
int[][] matrix = new int[rows][columns];
130131
matrix[0][1] = 5;
131132
matrix[1][0] = 3;
@@ -325,8 +326,8 @@ We can implement the same functionality using a hash table. Wouldn't a hash tabl
325326

326327
<!-- Kun hajautustaulusta haetaan tietoa tietyllä avaimella, metodin hashCode perusteella selvitetään paikka, mistä tietoa haetaan. Samassa paikassa voi olla useampi value (listassa), jolloin haettavaa avainta verrataan jokaiseen listalla olevaan valueon equals-metodia käyttäen. Kun taulukosta haetaan valuea tietyllä avaimella -- eli indeksillä -- ei vastaavaa toiminnallisuutta tarvitse tehdä. Taulukossa joko on value tai valuea ei ole. Taulukkoon liittyy pieni tehokkuushyöty ohjelman suorituskyvyn kannalta. -->
327328
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.
328-
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.
329-
When we search for a a value of a key -- or index -- in an array, we do not have to do any of that.
329+
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.
330+
When we search for a value of a key -- or index -- in an array, we do not have to do any of that.
330331
An array either contains a certain value or it does not, so there is a small performance beneft on using arrays.
331332

332333
<!-- Tämä tehokkuushyöty kuitenkin tulee lisääntyneen virhealttiuden sekä työmäärän kustannuksella. Hajautustauluun on valmiiksi toteutettuna sisäisen taulukon kasvattaminen ja sen toiminnallisuutta on testattu hyvin laajasti. Taulukkoa käytettäessä tällaista etua ei ole -- uutta toiminnallisuutta toteuttaessa saattaa päätyä virheisiin, mikä kasvattaa työmäärää. Virheet ovat toki luonnollinen osa ohjelmistokehitystä. -->
@@ -335,7 +336,7 @@ Hash tables have tested and proven functionality for increasing the size of the
335336
However, errors are accepted and natural part of software development.
336337

337338
<!-- Kun ajattelemme muistin käyttöä, hajautustaululla voi olla -- tapauksesta riippuen -- pieni etu. Kun taulukko luodaan, muistista varataan heti tila koko taulukolle. Mikäli taulukon jokaiseen indeksiin ei tarvitse lisätä tietoa, on osa tästä tiedosta varattuna turhaan. Hajautustaululla taas tällaista muistin varaamista ei ennakkoon tehdä -- hajautustaulun kokoa kasvatetaan tarvittaessa. -->
338-
When we consider the memory usage, hash table might -- in some situations -- have some benefits.
339+
When we consider the memory usage, hash tables might -- in some situations -- have some benefits.
339340
When an array is created, enough memory for the whole array is allocated for it.
340341
If we do not have values in each element of the array, some of the memory stays unused.
341342
With hash tables this does not happen -- the size of the hash table is increased only when necessary.

0 commit comments

Comments
 (0)