Skip to content

Commit f2a00d2

Browse files
authored
GH-211: Array in General (#212)
1 parent 0040abd commit f2a00d2

File tree

7 files changed

+38
-9
lines changed

7 files changed

+38
-9
lines changed

.github/ISSUE_TEMPLATE/new-article.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ body:
2727
description: Select one or more topics for the article
2828
multiple: true
2929
options:
30-
- Big-O
31-
- Bitwise
3230
- Array
3331
- String
3432
- Linked List
@@ -41,6 +39,8 @@ body:
4139
- Searching
4240
- Brute force, Backtracking
4341
- Greedy
42+
- Big-O
43+
- Bitwise
4444
- Range queries (prefix sum)
4545
- Dynamic Programming (Basic)
4646
- Dynamic Programming (Intermediate)
@@ -57,12 +57,13 @@ body:
5757
label: Programming language
5858
description: Select a programming language for the article
5959
options:
60-
- C (c)
60+
- General
6161
- C++ (cpp)
6262
- Java (java)
6363
- Python (py)
64-
- Rust (rs)
6564
- Typescript (ts)
65+
- C (c)
66+
- Rust (rs)
6667
- type: checkboxes
6768
id: article-checklist
6869
validations:
@@ -76,3 +77,5 @@ body:
7677
- label: 📈 Complexity Analysis
7778
- label: 🔗 Further Reading
7879
- label: 🏁 Update README
80+
- label: Update link in README.md (for general)
81+
- label: Update link to concrete implementation

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,8 @@ A data structure is a data organization, management, and storage format that is
6464

6565
<ul>
6666
<li>
67-
<code>B</code> Array
68-
<a href="/concepts/python/array.md"><code>py🐍</code></a>
69-
<a href="/concepts/typescript/array.md"><code>ts</code></a>
67+
<code>B</code>
68+
<a href="/concepts/general/array/README.md">Array</a>
7069
</li>
7170
<li>
7271
<code>B</code> String

concepts/general/array/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Array
2+
3+
*See implementation in* C++, Java, [Python](/concepts/python/array/README.md), [Typescript](/concepts/typescript/array/README.md)
4+
5+
An array is a data structure that contains a group of elements. Each element can be accessed using an index. The index of the first element is 0, and the index of the last element is the length of the array minus 1.
6+
7+
In competive programming, arrays are often used to store a list of values. For example, an array can be used to store the list of numbers in a sequence.
8+
9+
## Type of Arrays
10+
11+
* Static Array: An array whose size is fixed.
12+
* Dynamic Array: An array whose size can be changed.
13+
14+
## Array Operations
15+
16+
* `array.length`: Returns the number of elements in the array.
17+
* `array[index]`: Returns the element at the given index.
18+
* `array[index] = value`: Sets the element at the given index to the given value.
19+
20+
## 🔗 Further Reading
21+
22+
* [Array (data structure)](https://en.wikipedia.org/wiki/Array_(data_structure))
23+
* ▶️ [Array In Data Structure](https://www.youtube.com/watch?v=eXFItikqw8c&ab_channel=Simplilearn), Simplilearn
24+
* ▶️ [Dynamic and Static Arrays](https://www.youtube.com/watch?v=PEnFFiQe1pM&list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu&index=4&ab_channel=WilliamFiset), WilliamFiset
25+
26+
27+
File renamed without changes.
File renamed without changes.

readme/python/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ A data structure is a data organization, management, and storage format that is
2121
<ul>
2222
<li>
2323
<code>B</code>
24-
<a href="/concepts/python/array.md">Array</a>
24+
<a href="/concepts/python/array/README.md">Array</a>
2525
</li>
2626
<li><code>B</code>
2727
<a href="/concepts/python/string.md">String</a>

readme/typescript/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ A data structure is a data organization, management, and storage format that is
2121
<ul>
2222
<li>
2323
<code>B</code>
24-
<a href="/concepts/typescript/array.md">Array</a>
24+
<a href="/concepts/typescript/array/README.md">Array</a>
2525
</li>
2626
<li>
2727
<code>B</code> String

0 commit comments

Comments
 (0)