Skip to content

GH-211: Array in General #212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/ISSUE_TEMPLATE/new-article.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ body:
description: Select one or more topics for the article
multiple: true
options:
- Big-O
- Bitwise
- Array
- String
- Linked List
Expand All @@ -41,6 +39,8 @@ body:
- Searching
- Brute force, Backtracking
- Greedy
- Big-O
- Bitwise
- Range queries (prefix sum)
- Dynamic Programming (Basic)
- Dynamic Programming (Intermediate)
Expand All @@ -57,12 +57,13 @@ body:
label: Programming language
description: Select a programming language for the article
options:
- C (c)
- General
- C++ (cpp)
- Java (java)
- Python (py)
- Rust (rs)
- Typescript (ts)
- C (c)
- Rust (rs)
- type: checkboxes
id: article-checklist
validations:
Expand All @@ -76,3 +77,5 @@ body:
- label: 📈 Complexity Analysis
- label: 🔗 Further Reading
- label: 🏁 Update README
- label: Update link in README.md (for general)
- label: Update link to concrete implementation
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@ A data structure is a data organization, management, and storage format that is

<ul>
<li>
<code>B</code> Array
<a href="/concepts/python/array.md"><code>py🐍</code></a>
<a href="/concepts/typescript/array.md"><code>ts</code></a>
<code>B</code>
<a href="/concepts/general/array/README.md">Array</a>
</li>
<li>
<code>B</code> String
Expand Down
27 changes: 27 additions & 0 deletions concepts/general/array/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Array

*See implementation in* C++, Java, [Python](/concepts/python/array/README.md), [Typescript](/concepts/typescript/array/README.md)

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.

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.

## Type of Arrays

* Static Array: An array whose size is fixed.
* Dynamic Array: An array whose size can be changed.

## Array Operations

* `array.length`: Returns the number of elements in the array.
* `array[index]`: Returns the element at the given index.
* `array[index] = value`: Sets the element at the given index to the given value.

## 🔗 Further Reading

* [Array (data structure)](https://en.wikipedia.org/wiki/Array_(data_structure))
* ▶️ [Array In Data Structure](https://www.youtube.com/watch?v=eXFItikqw8c&ab_channel=Simplilearn), Simplilearn
* ▶️ [Dynamic and Static Arrays](https://www.youtube.com/watch?v=PEnFFiQe1pM&list=PLDV1Zeh2NRsB6SWUrDFW2RmDotAfPbeHu&index=4&ab_channel=WilliamFiset), WilliamFiset



File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion readme/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ A data structure is a data organization, management, and storage format that is
<ul>
<li>
<code>B</code>
<a href="/concepts/python/array.md">Array</a>
<a href="/concepts/python/array/README.md">Array</a>
</li>
<li><code>B</code>
<a href="/concepts/python/string.md">String</a>
Expand Down
2 changes: 1 addition & 1 deletion readme/typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ A data structure is a data organization, management, and storage format that is
<ul>
<li>
<code>B</code>
<a href="/concepts/typescript/array.md">Array</a>
<a href="/concepts/typescript/array/README.md">Array</a>
</li>
<li>
<code>B</code> String
Expand Down