MindMap Gallery Notes on knowledge point framework of common algorithms for arrays
Commonly used algorithms for arrays include one-dimensional arrays, enhanced loops, variable parameters, command line parameters, common algorithms, two-dimensional arrays, and array copy knowledge points. It is suitable for friends who organize and memorize knowledge points.
Edited at 2022-11-15 09:53:42This Valentine's Day brand marketing handbook provides businesses with five practical models, covering everything from creating offline experiences to driving online engagement. Whether you're a shopping mall, restaurant, or online brand, you'll find a suitable strategy: each model includes clear objectives and industry-specific guidelines, helping brands transform traffic into real sales and lasting emotional connections during this romantic season.
This Valentine's Day map illustrates love through 30 romantic possibilities, from the vintage charm of "handwritten love letters" to the urban landscape of "rooftop sunsets," from the tactile experience of a "pottery workshop" to the leisurely moments of "wine tasting at a vineyard"—offering a unique sense of occasion for every couple. Whether it's cozy, experiential, or luxurious, love always finds the most fitting expression. May you all find the perfect atmosphere for your love story.
The ice hockey schedule for the Milano Cortina 2026 Winter Olympics, featuring preliminary rounds, quarterfinals, and medal matches for both men's and women's tournaments from February 5–22. All game times are listed in Eastern Standard Time (EST).
This Valentine's Day brand marketing handbook provides businesses with five practical models, covering everything from creating offline experiences to driving online engagement. Whether you're a shopping mall, restaurant, or online brand, you'll find a suitable strategy: each model includes clear objectives and industry-specific guidelines, helping brands transform traffic into real sales and lasting emotional connections during this romantic season.
This Valentine's Day map illustrates love through 30 romantic possibilities, from the vintage charm of "handwritten love letters" to the urban landscape of "rooftop sunsets," from the tactile experience of a "pottery workshop" to the leisurely moments of "wine tasting at a vineyard"—offering a unique sense of occasion for every couple. Whether it's cozy, experiential, or luxurious, love always finds the most fitting expression. May you all find the perfect atmosphere for your love story.
The ice hockey schedule for the Milano Cortina 2026 Winter Olympics, featuring preliminary rounds, quarterfinals, and medal matches for both men's and women's tournaments from February 5–22. All game times are listed in Eastern Standard Time (EST).
Notes on knowledge point framework of common algorithms for arrays
Array overview
What is an array
Array is a data structure used to store "a group of data of the same type"
Array variables are reference data types
The elements in the array can be of any data type (basic types and reference types)
An array has a corresponding index, and each element in the array can be accessed through the index.
After an array is created, its size cannot be changed, but each element in the array can be changed.
one-dimensional array
statement
int a[];
int[] a1;
double b [];
Mydate[]c;
You cannot specify the length of an array when declaring it
initialization
dynamic initialization
new data type [size]
new data type []{element 1, element 2...element n}
static initialization
Initialize the array while defining it
int a[] = {1,3,5,7,9,11};
String s [] = {"a","b","c"};
Simple data type array (Refer to the memory change chart on PPT)
definition
create
Reference data type array (Refer to the memory change chart on PPT)
definition
create
initialization
Default initialization rules for array elements
Reference method of array elements: array name [subscript]
Enhance for loop
for (data type variable name: array variable name) {...}
Purpose: Only suitable for sequentially traversing and displaying the contents of all elements in an array or collection.
Defect: Index (subscript) value cannot be accessed when traversing an array or collection
variable parameter
When declaring a method .....Method name (data type... variable name)
It can accept 0-n parameters of this type. Use arrays in methods to process
Variable parameters must be written at the end of the formal parameter list, Otherwise, a compilation error will be reported.
Command line parameters
java class name abc "hello world" 123 "ni hao"
Pass parameters to (String args[]) of the main method
Commonly used algorithms
sort
Bubble Sort
selection sort
insertion sort
Find
Search sequentially, starting from the first element and searching sequentially
binary search
Prerequisite: Search in sorted array
Basic idea
code
java.util.Arrays Array operation tool class
public static void sort(int[] a);
public static int binarySearch(int[] a, int key); //Use binary search method, provided that the array has been sorted from small to large
public static String toString(int [] a) //Format the incoming array into string output
Two-dimensional array
array of arrays
initialization
static initialization
dynamic initialization
array copy
System.arraycopy(.....)
public static int[] copyOf(int[] original, int newLength) of Arrays class