Skip to content
Snippets Groups Projects
Commit 809720f4 authored by Škoviera, Radoslav, Mgr., Ph.D.'s avatar Škoviera, Radoslav, Mgr., Ph.D.
Browse files

Added README

parent faccdf0e
No related branches found
No related tags found
No related merge requests found
# PGE Lectures
## Installation
```bash
pip install -e .
```
## Usage
Info:
```bash
python -m pge_lectures
```
Run a specific lesson:
```bash
python -m pge_lectures <lesson_number>
```
List available lessons:
```bash
python -m pge_lectures -l
```
This diff is collapsed.
# Basic data structures, intro to asymptotic complexity
---
title: "Lecture 1"
format:
......@@ -5,7 +6,6 @@ format:
code-fold: false
jupyter: python3
---
# Basic data structures, intro to asymptotic complexity
## Basic data structures (in Python)
......@@ -1082,9 +1082,6 @@ bogosort_data = {
plot_data({'bogosort': (list(bogosort_data.values()), 'bogosort sort')}, 'bogosort sort', x_values=list(bogosort_data.keys()))
```
### Comparison of operations with the basic data structures
##### Pre-allocation
Pre-allocation of arrays is (slightly) faster than iterative appending. Although, in Python, both are relatively slow. Depending on the task, list comprehension may be more efficient. In general, if the appending overhead is insignificant, it will not have significant impact on runtime whether pre-allocation is used. However, with large loops it might cause memory issues and pre-allocation will be important with more efficient array implementations (e.g., NumPy arrays).
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment