Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | remove trailing whitespaceHEADv0.0.1master | Sven Göthel | 2024-10-13 | 1 | -7/+7 |
| | |||||
* | lesson40_*: Resolve midpoint sum overflow, mention std::midpoint | Sven Göthel | 2024-05-06 | 1 | -3/+7 |
| | |||||
* | Review of STL iterator + difference_type limitations (half range) compared ↵ | Sven Göthel | 2024-05-03 | 1 | -5/+5 |
| | | | | | | | | | | | | | | | | | to size_t index ops and pointer arithmetic Svenson an I discussed the issue and we were a bit puzzled ;-) So it would have been great to have size_type to be unsigned (ssize_t) to simply constrain and harmonize the whole std::vector (etc) operations. Alternatively, an iterator could have been a pointer type, where such operations are at least tolerated despite similar considerations to ptrdiff_t like void *lo, *hi; lo-hi ! In the meantime, if using iterator and a size, stick to iterator and signed size. | ||||
* | Resolve clang-tidy warnings=error; Notable std::vector<>: size() -> size_t ↵ | Sven Göthel | 2024-05-03 | 1 | -24/+38 |
| | | | | | | | | | | | (unsigned) but iterator and difference_type are signed and losing half of range Because std::vector<>::begin() iterator performs arithmetic using a signed difference_type, we need to use such a signed type here to avoid `bugprone-narrowing-conversions` (LINT) Now, isn't this odd as std::vector<>::size() uses unsigned size_type, aka size_t and mentioned iterator hence lose half the value range possible? | ||||
* | Adding lesson 40: binary-search *01.cpp, +sorted_insert *02 and quicksort ↵ | Sven Göthel | 2024-04-23 | 1 | -45/+156 |
| | | | | *12.cpp, each with optional variations | ||||
* | Add lesson40: Simple algorithms (starting w/ binary search) | Sven Göthel | 2024-02-25 | 1 | -0/+83 |