1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
Revise later
SpaceTo flip
If confident
All Flashcards
What is an array traversal?
Visiting each element in an array in a specific order.
What is the mode of an array?
The element that appears most frequently in the array.
What is meant by 'shifting' an array?
Moving elements in the array to the left or right, potentially wrapping around.
What is the mean of an array?
The sum of all elements in the array divided by the number of elements.
What does it mean to reverse an array?
To rearrange the elements of the array in the opposite order.
Define 'frequency' in the context of array elements.
The number of times a specific element appears in the array.
Define 'consecutive sequences' in an array.
Subsets of elements that are adjacent to each other in the array.
What is the purpose of the 'duplicates' algorithm?
To determine if any element appears more than once in the array.
What is the role of the 'isEven' algorithm?
To check if all elements in the array are even numbers.
What is the 'sum' of an array?
The result of adding all the elements in the array together.
How is finding the minimum and maximum value in an array applied in image processing?
Determining the darkest and brightest pixels in an image.
How is calculating the mean of an array applied in data analysis?
Finding the average value of a dataset, such as the average temperature or sales figures.
How is finding the mode of an array applied in market research?
Identifying the most popular product or service based on customer preferences.
How is checking for duplicates in an array applied in database management?
Ensuring data integrity by preventing duplicate entries in a database table.
How is shifting elements in an array applied in digital signal processing?
Implementing time-delay operations on audio or video signals.
How is reversing an array applied in cryptography?
Simple transposition ciphers can reverse sections of data as part of encryption/decryption.
How is determining if all values have a certain property applied in quality control?
Verifying that all products meet a specific standard or requirement.
How is accessing consecutive sequences applied in bioinformatics?
Analyzing DNA sequences for patterns and motifs.
How is determining the frequency of elements applied in text analysis?
Counting the occurrences of words in a document to analyze its content.
How are array algorithms used in recommendation systems?
Analyzing user data to find similar items or users, then recommending items based on popularity or similarity.
What does the following code output?
```java
int[] arr = {1, 2, 3, 4, 5};
System.out.println(maximum(arr));
```
5
What does the following code output?
```java
int[] arr = {5, 4, 3, 2, 1};
System.out.println(minimum(arr));
```
1
What does the following code output?
```java
int[] arr = {1, 2, 3, 4, 5};
System.out.println(sum(arr));
```
15
What does the following code output?
```java
int[] arr = {1, 2, 3, 4, 5};
System.out.println(mean(arr));
```
3.0
What does the following code output?
```java
int[] arr = {1, 2, 2, 3, 3, 3};
System.out.println(mode(arr));
```
3
What does the following code output?
```java
int[] arr = {2, 4, 6, 8, 10};
System.out.println(isEven(arr));
```
true
What does the following code output?
```java
int[] arr = {1, 3, 5, 7, 9};
System.out.println(isEven(arr));
```
false
What does the following code output?
```java
int[] arr = {1, 2, 3, 2, 1};
System.out.println(duplicates(arr));
```
true
What does the following code output?
```java
int[] arr = {1, 2, 3, 4, 5};
System.out.println(duplicates(arr));
```
false
What does the following code output?
```java
int[] arr = {2, 4, 6, 8, 10};
System.out.println(evenFrequency(arr));
```
5