Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects, and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Developer articles
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
ZincByte
Awesome-Algorithm-Study
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
More
items
Files
Expand file tree
master
Breadcrumbs
Awesome-Algorithm-Study
/
data_struct_study
/
src
/
Main.java
Copy path
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
39 lines (34 loc) · 1.31 KB
master
Breadcrumbs
Awesome-Algorithm-Study
/
data_struct_study
/
src
/
Main.java
Copy path
Top
File metadata and controls
Code
Blame
39 lines (34 loc) · 1.31 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
31
32
33
34
35
36
37
38
39
/**
* 数据结构地图:
* 1、线性结构:动态数组、普通队列、栈、链表、哈希表。
* 2、树形结构:二分搜索树、AVL 树、红黑树
* 堆、线段树
* 多叉树:Trie、并查集
* 3、图结构:邻接表(与链地址法的哈希表很像,它是一个有 n 个链表的数组,
* arr[i] 存储的就是和 i 这个顶点相连接的其它顶点或和 i 这个顶点相连接的边。
* 邻接矩阵(一个 n * n 的二维数组,G(i,j) 表示从 i 到 j 有一个边)。
* 4、抽象数据结构:
* 线性表:动态数组、链表。
* 栈、队列。
* 集合、映射:
* 有序集合,有序映射
* 无序集合、无序映射
*
* 《算法导论》学习:第一、二遍学习时需要忽略其中的数学推导部分。
*
*/
public
class
Main
{
public
static
void
main
(
String
[]
args
) {
int
[]
arr
=
new
int
[
20
];
for
(
int
i
=
0
;
i
<
arr
.
length
;
i
++) {
arr
[
i
] =
i
;
}
int
[]
scores
=
new
int
[]{
88
,
99
,
100
};
for
(
int
i
=
0
;
i
<
scores
.
length
;
i
++) {
System
.
out
.
println
(
scores
[
i
]);
}
for
(
int
score
:
scores
){
System
.
out
.
println
(
score
);
}
}
}
You can’t perform that action at this time.