Skip to content

Commit

Permalink
fix: Wrong push method in python, append is the correct one
Browse files Browse the repository at this point in the history
  • Loading branch information
jpcairesf committed Apr 18, 2024
1 parent fe06d75 commit 5a7dbf6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions content/notes/data-structures/index.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
+++
---
title = 'Data Structures'
date = 2024-03-09T07:50:00-00:00
draft = false
+++
---

# Arrays

Expand Down Expand Up @@ -67,10 +67,10 @@ It's a LIFO-behaved data structure with a pointer to the last element for fast a

```python
stack = []
stack.push(1)
stack.push(3)
stack.append(1)
stack.append(3)
print(stack.pop()) # 3
stack.push(2)
stack.append(2)
print(stack.pop()) # 2
print(stack.pop()) # 1
```
Expand Down

0 comments on commit 5a7dbf6

Please sign in to comment.