Java Arrays and Algorithms

0.0(0)
Studied by 1 person
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/16

flashcard set

Earn XP

Description and Tags

Vocabulary and concepts covering Java array basics, initialization, searching (Linear/Binary), sorting (Bubble/Selection), and two-dimensional arrays.

Last updated 6:10 PM on 7/21/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

17 Terms

1
New cards

Array

An object which contains a finite number of values of the same data type and acts as a container for multiple values of a homogeneous data type under one name.

2
New cards

Index of an array

The location of a value in a particular array; in Java, indexing begins at 00.

3
New cards

Homogeneous data

Values of the same data type; an array must store only this type of data, and values of different types cannot be assigned to the same array.

4
New cards

Array Declaration

The process of creating a reference for an array by specifying the data type and name, such as int[] numbers;\text{int[] numbers;} or int numbers[];\text{int numbers[];}, without yet allocating memory.

5
New cards

Array Initialisation

The process of telling the compiler how much memory space is going to be occupied by the array, determined by the number of elements and the data type.

6
New cards

new\text{new} Keyword

A keyword used to initialize an array and reserve memory to store a specific number of values, such as in float[] prices = new float[5];\text{float[] prices = new float[5];}.

7
New cards

Searching

The process of finding the index of an element in an array or checking if a particular value exists within the array.

8
New cards

Linear Search

Also called sequential search, it is a method where each element in the array is compared with the value to be searched in a sequential manner.

9
New cards

length\text{length} Method

A built-in Java property that returns the number of elements (the size) of a given array.

10
New cards

Binary Search

A fast searching algorithm performed on a sorted array that works by dividing the search range in half during each iteration by comparing the target with the middle element.

11
New cards

Sorting

The process of arranging data elements that are randomly placed in an array into a specific sequence, such as ascending or descending order.

12
New cards

Bubble Sorting

A sorting mechanism where adjacent elements are compared and interchanged (swapped) if they are in the wrong order, repeating until the entire data set is sorted.

13
New cards

Swapping

The process of interchanging two adjacent elements in an array using a temporary variable, typically used in sorting algorithms like Bubble Sort.

14
New cards

Selection Sorting

A sorting method that finds the maximum or minimum element in the unsorted portion of an array and swaps it with the first element of that portion, maintaining a sorted subarray at the beginning.

15
New cards

Two-Dimensional Array

An array that represents data in a table or matrix format, indexed by two subscripts: one for the rows and one for the columns.

16
New cards

Matrix Representation

A pictorial representation of a 2-D array showing data organized in rows (ii) and columns (jj).

17
New cards

Diagonal elements sum

A process in 2-D arrays where elements with equal row and column indices, such as (0,0)(0,0) and (1,1)(1,1), are added together.